here is the code i have.
<?
session_start();
$a =($_SESSION);
var_export($a);
?>
here is what is out putted,
array ( 'k_user_id' => 134646, 'cart' => array ( 0 => array ( 'productid' => '1', 'qty' => 1, ), 1 => array ( 'productid' => '2', 'qty' => 1, ), 2 => array ( 'productid' => '8', 'qty' => 1, ), ), )
Here is what i wan to do.
I want to take each array and turn it into a ravable
example:
Take this :
array ( 'k_user_id' => 134646, 'cart' => array ( 0 => array ( 'productid' => '1', 'qty' => 1, ), 1 => array ( 'productid' => '2', 'qty' => 1, ), 2 => array ( 'productid' => '8', 'qty' => 1, ), ), )
turn it into this:
$k_user_id= 134646
$productid1 =1
$qty1=1
$productid=2
$qty2= 1
$productid3=8
$qty3= 1
But there may be more or less the 3 items there may be 9999999 or 1 I need it to loop through adding 1to $whatever=what ever
Then i need it to insert all that data into a data base
then i need to echo all that data
how do i do that?
<?
session_start();
$a =($_SESSION);
var_export($a);
?>
here is what is out putted,
array ( 'k_user_id' => 134646, 'cart' => array ( 0 => array ( 'productid' => '1', 'qty' => 1, ), 1 => array ( 'productid' => '2', 'qty' => 1, ), 2 => array ( 'productid' => '8', 'qty' => 1, ), ), )
Here is what i wan to do.
I want to take each array and turn it into a ravable
example:
Take this :
array ( 'k_user_id' => 134646, 'cart' => array ( 0 => array ( 'productid' => '1', 'qty' => 1, ), 1 => array ( 'productid' => '2', 'qty' => 1, ), 2 => array ( 'productid' => '8', 'qty' => 1, ), ), )
turn it into this:
$k_user_id= 134646
$productid1 =1
$qty1=1
$productid=2
$qty2= 1
$productid3=8
$qty3= 1
But there may be more or less the 3 items there may be 9999999 or 1 I need it to loop through adding 1to $whatever=what ever
Then i need it to insert all that data into a data base
then i need to echo all that data
how do i do that?