How can I preg_match until no more results is found?
I'm using file get contents
for example i am taking this url
$updated_url = "https://www.testcompany.com/count=1";
$html2 = file_get_contents($updated_url);
preg_match_all('/<ul class="standard">(.*?)<\/ul>/s', $html2, $test);
1) If > preg_match is true > add count = +1 in the url (go to https://www.testcompany.com/count=2 url) and check if preg match value true or not.
2) Loop If until preg_match is false.
i want to get the last url which is matched with preg match value.