i want bill records stored in session avoiding unwanted data using foreach loop or print_r print giving conventional structure
<?php $b = print_r(array_values ($_session), true); echo $b.'<br/>'; ?> <?php foreach ($_session $key => &$value) { $array[] = $value; echo $value; } ?> now $value giving data , $b giving data along keys want print data in form of bill stored different required fields in different session arrays using array_push($_session['a1'],$conum); want print in form of html table independent of number values stored in session array guys please me out
just store data in $_session['my_data'], i.e array_push($_session['my_data']['a1'], $conum); can print this:
foreach ($_session['my_data'] $key => $value) { echo "{$key} => {$value}"; }
Comments
Post a Comment