RE: [PHP] Best method to store shopping cart contents
| From: | Richard Lynch | Date: | Fri, 28 Jan 2005 17:25:13 +0000 |
| Subject: | RE: [PHP] Best method to store shopping cart contents | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-207614@lists.php.net to get a copy of this message | ||
Bosky, Dave wrote:
> Do you have a simple example of how to create a multi-dimensional array
> and
> store it in a session variable?
Errrr. Okay.
<?php
session_start();
$foo['whatever']['you']['want']['dimensions'] = 42;
$_SESSION['foo'] = $foo;
?>
For your penance you now must read:
http://php.net/session_start
http://php.net/manual/en/language.types.array.php
--
Like Music?
http://l-i-e.com/artists.htm