Should be a nice easy one today but I can't find the answer anywhere.
I have a multidimensional array. It stores partid and quantity.
$pCombined[] = array ( $newName[$b], $newQty[$b] );
I want to use PHP join as suggested here: Passing an array to a query using a WHERE clause
I need to get more data from mySQL about the parts so I need the list of ids joined up as I don't like the idea of running one SQL query for each row.
I tried to use:
$ids = join(',', $pCombined);
That just gives array, array, array....e.t.c.
I tried a few obvious combinations of square brackets. What I guess I want is...
$ids = join(',', $pCombined[*][0]); (where * is all)
I think I might also be overcomplicating the whole thing and I could use foreach or a for loop and join manually I guess. Its not quite a basic shopping cart but the principals are similar. Any ideas how I can do this or perhaps push me in a different direction. Thanks.