[Solved] Extract breadcrumb from html with regex and remove html tags
Using DomDocument and xpath you can load the entire html and query for the li elements. Then it’s a matter of simply outputting the nodeValue The xpath->query method below will search for all li elements that belong to a parent ul that has a class of breadcrumb Example $html=” <html> <body> <div class=”container”> <ul itemprop=”breadcrumb” … Read more