I want to store array into mysql db something like this
item_row = nike,adidas,puma
qty_row = 1,3,2
total_row = 100,200,150
foreach
foreach ($_SESSION['order'] as $values) {
$item_name = $values['item-name'];
$item_qty = $values['item-qty'];
$item_price = $values['item-price'];
}
Let me know how to do that?
update
foreach ($_SESSION['order'] as $values) {
$item_name[] = $values['item-name'];
$item_qty[] = $values['item-qty'];
$item_price[] = $values['item-price'];
}
$item_row = implode(",", $item_name);
$qty_row = implode(",", $item_qty);
$total_row = implode(",", $item_price);