Menu
Hi,
Im trying to extract information from html source code from a website. I have the source stored in a variable, $listings, and want to split it into an array of matches, $matches, using the preg_match_all function like so:
preg_match_all(‘/<li>(.*)</li>/’, $listings, $matches);
I want to match blocks of HTML found between list tags.
The above code doesn’t seem to match anything when i print out the array. I have tested the regex in a regex testing tool, so im inclined to think im using the function wrong.
I’d appreciate any ideas,
Thanks