Array
(
[product_id] => Array
(
[0] => 61
[1] => 62
[2] => 63
)
[product_name] => Array
(
[0] => 44" jesson WIDESCREEN LCD
[1] => 19" jesson WIDESCREEN LCD
[2] => Touchscreen monitor
)
)
I am sort of confused on how to do this simple loop where product_id[0] always matches product_name[0] and so on ….i tried
if i do a foreach i get the first loop is all the product_id and i need the names to be printed also….any ideas
For ease of explanation, let’s set:
As long as you’re sure that
$product_idand$product_namehave the same keys (and it looks like they do), you can make your loop like this: