There is a list with categories of goods. In each li there is another list with subcategories. How can simple categories and subcategories be displayed using simple_html_dom? Thanks in advance
//подгружаем библиотеку require_once 'simple_html_dom.php'; //создаём новый объект $html = new simple_html_dom(); //загружаем в него данные $html = file_get_html('smeg-store.com.ua/'); if ($html->innertext!='' and count($html->find('nav.header__cats li ul '))) { foreach ($html->find('nav.header__cats li ul') as $a) { # code... echo $a->parent()->children(0)->innertext.'<br />'; echo $a->parent()->innertext.'<br />'; } } //освобождаем ресурсы $html->clear(); unset($html);