I'm trying to post and receive a two dimensional array, but I can't get it to work.
Could you guys help me out?
Thanks in advance!
Here is my code:
$items[] = array(
'pid' => $pid
, 'qty' => $product_qty
);
<input type="hidden" name="items[]" id="pid" />
foreach ($_POST['items'] as $row) {
$pid = $row['pid'];
$product_qty = $row['qty'];
}
print_r($_POST);and you see the structure of your array and with which keys you can access it.