Ah Sorry I pasted the wrong code:
for($i = 0; $i < $cart["idx"]; $i++) {
$result=implode(',', $cart[$i]) ;
echo $result;
}
This is not outputting the whole array seperated by commas which is great, but I only want the product ID, as soon as I try to specify a field of the array I get errors. I just need to add the product_id to the output. Is this the correct way for handling this?