php-general | 2003022
Date: 02/28/03
- Next message: ati ati: "[PHP] exec/passthru: io operation not permitted"
- Previous message: Tom Rogers: "Re[4]: [PHP] virtual() test"
- Next in thread: Joshua Moore-Oliva: "Re: [PHP] passing arrays to a session-variable"
- Reply: Joshua Moore-Oliva: "Re: [PHP] passing arrays to a session-variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm using this script to test passing arrays to a Session-variable.
<?
session_start();
// method 1
$_SESSION['array1'] = array("item1", "item2");
// method 2
session_register("array2");
$array2 = array("itemA", "itemB");
header ("Content-type: text/html");
echo $array1[0]. "<br />";
echo $array2[0];
?>
method 1 doesn't work until another PHP is loaded, only then the var is
ouputted...
method 2 works fine, but i'd prefer using $_SESSION all the way instead of
session_register
any suggestions?
grace
michiel
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: ati ati: "[PHP] exec/passthru: io operation not permitted"
- Previous message: Tom Rogers: "Re[4]: [PHP] virtual() test"
- Next in thread: Joshua Moore-Oliva: "Re: [PHP] passing arrays to a session-variable"
- Reply: Joshua Moore-Oliva: "Re: [PHP] passing arrays to a session-variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

