find('li.document-row'); foreach ($items as $item) { /** @var simple_html_dom $item */ // Do something with each list item $title = trim($item->find('div.title', 0)->plaintext); $href = $item->find('a', 0)->href; $url = 'https://www.fia.com' . $href; $date = $item->find('span.date-display-single', 0)->plaintext; $item = []; $item['uri'] = $url; $item['title'] = $title; $item['timestamp'] = (string) DateTime::createFromFormat('d.m.y H:i', $date)->getTimestamp(); ; $item['author'] = 'Fia'; $item['content'] = "Document on date $date: $title
$url"; $item['categories'] = 'Document'; $item['uid'] = $title . $date; $count = count($this->items); if ($count > 20) { break; } else { $this->items[] = $item; } } } }