Thursday, October 29, 2009
Writing and Reading an Array from a Session.
Posted on 11:57 PM by programlover
I have the following array
php Code:
<?php foreach ($order->getItems() as $item) { ?>
"<?php echo $data['orderNumber']?>",
"<?php echo $item->getProductNumber()?>",
"<?php echo $item->getName()?>",
"<?php echo $item->getUnitPrice()?>",
"<?php echo $item->getQuantity()?>"
<?php } ?>
I need help writing the follow information into a session and then reading the same info from a session.
I tried using
php Code:
$_SESSION['neworders']=$order;
but that didn't work.
The array can contain one product or multiple products.