Hi everybody,
I want to write an array into a php session variable, is this possible? If so, can anybody show me an example?
thanks in advace.
| SitePoint Sponsor |


Hi everybody,
I want to write an array into a php session variable, is this possible? If so, can anybody show me an example?
thanks in advace.
PHP Code:<?php
session_start();
$_SESSION['breakfast'] = array(
'beans',
'bacon',
'sausage',
'mushroom'
);
echo 'first on the breakfast menu is ', $_SESSION['breakfast'][0], ', mmmmm.';
?>
@AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.


Thank you sir..![]()
Bookmarks