Hey guys this is the code I am using
$ch="s1";
$_SESSION[$ch] = array();
$_SESSION[$ch][] = $_POST['t0'];
$_SESSION[$ch][] = $_POST['t1'];
$_SESSION[$ch][] = $_POST['t2'];
$_SESSION[$ch][] = $_POST['t3'];
$_SESSION[$ch][] = $_POST['t4'];
$_SESSION[$ch][] = $_POST['t5'];
$_SESSION[$ch][] = $_POST['t6'];
But when I am printing the session data on screen $_SESSION['s1'][0] is having all the data of all the other index, $_SESSION['s1'][1] to $_SESSION['s1'][6] are not displaying anything.
Here is the result for var_dump($_SESSION);
's1' => array (size=7)
0 => string 'All Purpose Horn Anvil A-1t1=Shipping Weight: 900gmst2=Price: € 5.00t3=Quantity: t4= t5=56t6=All Purpose Horn Anvil A-1 Shipping Weight: 900gms Price: € 5.00 Quantity: 56' (length=192)
1 => null
2 => null
3 => null
4 => null
5 => null
6 => null
For some reason the POST indexes i.e t0 to t6 are been shown in s1.
var_dump($_SESSION);