0
kord posted
How can I extract inner text of HTML tags <li> using Regex with preg_match_all in PHP?
I am not good at regular expression and want to get some info from some web pages soI start with
file_get_contents("URL") to grab the page's HTML source. now the issue is I don't know how to get a specific part of the HTML
I get that preg_match_all() is useful to do this but I am clueless about how to do it
i want to get extract all in li tag , not just ui tag ,
below is sample HTML code :
<li><span class="a-list-item">
iPhone 7 </span>
</li>
<li><span class="a-list-item"> iphone 8 </span></li>
<li><span class="a-list-item"> iPhone </li>