I have some php that hits a website. scrapes it for an item and then a price. i am having trouble joining them so i get
item 1 price 1
item 2 price 2
what i am getting is
item 1 price 1
item 1 price 2
item 1 price 3
item 2 price 1
item 2 price 2
item 2 price 3
here is my code
foreach($matches[0] as $item){
foreach ($matchprice[0] as $pricevalue) {
echo '<span style="font-weight:normal; font-size: 12pt;';
echo $item;
echo $pricevalue;
echo "<br />";
}
}
I have tried moving the items in and around the loops and using counts and even tried merging the arrays. All i got was array array as an out put. I hope i have made this clear enough.
Thanks for any help.