Hi,
I have the written the following code which scrapes price info from a website:
$url = 'http://www.mydomain.com';
$html = file_get_contents($url);
$pattern = '/<span class="price">(.*?)<\/span>/';
preg_match_all($pattern, $html, $matches);
print_r($matches);
It works well however I need to add in the delivery cost to each array element with a different pattern:
/<span class="delivery">(.*?)<\/span>/';
Any idea how i can do this so each array element has both the price and delivery costs in a two dimensional array?
Thanks for your advice