note 29527 deleted from function.session-register by sniper

From: Date: Wed, 14 May 2003 14:42:58 +0000
Subject: note 29527 deleted from function.session-register by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-47962@lists.php.net to get a copy of this message
For register array data in session : create your table (ex) : $table[0]="data 0"; $table[1]="data 1"; $table[2]="data 2"; and you have to only register the array and not the array data : session_register("table"); and NOT : session_register("table[0]"); session_register("table[1]"); session_register("table[2]"); after that for to display datas, write : echo $table[0]; echo $table[1]; echo $table[2]; and NOT : echo $_SESSION["table[0]"]; echo $_SESSION["table[1]"]; echo $_SESSION["table[2]"]; I don't know why, but it's alright like that ;o) xav

« previous php.notes (#47962) next »