note 40538 deleted from ref.session by nlopess

From: Date: Mon, 08 Mar 2004 17:15:00 +0000
Subject: note 40538 deleted from ref.session by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-66447@lists.php.net to get a copy of this message
Note Submitter: andreas dot agren at home dot se ---- Having numbers (where the type is string) as keys in the first dimension in $_SESSION will cause some weird behaviour when adding new content, like this: <?php $_SESSION['1234567'] = "some value"; ?> Sometimes, pretty often actually, it will cause the last place to be overwritten instead of just adding it to the end. Possible solutions are: <?php //add some text to the number $_SESSION['text_1234567'] = "some value"; //or, add a dimension $_SESSION['text']['1234567'] = "some value"; ?> I don't know if this is a bug or it's supposed to be like this, but in any way php does not display any error messages even if one has set it to show all errors.

« previous php.notes (#66447) next »