note 43553 deleted from function.setcookie by nlopess

From: Date: Fri, 25 Jun 2004 09:31:26 +0000
Subject: note 43553 deleted from function.setcookie by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-71658@lists.php.net to get a copy of this message
Note Submitter: vaidotasSPAMGUARD@orangeinside.com ---- It seems that there is limitation for amount of possible array items if you try to store an array to cookie, as it is described in manual. In example: <?php for ($i=1; $i<100; $i++) { setcookie("xcookie[$i]", 1, 1118906565); } ?> with this code I'm successfull to save just the last 20 elements of array. $_COOKIE content on second load of page: Array ( [xcookie] => Array ( [80] => 1 [81] => 1 [82] => 1 [83] => 1 [84] => 1 [85] => 1 [86] => 1 [87] => 1 [88] => 1 [89] => 1 [90] => 1 [91] => 1 [92] => 1 [93] => 1 [94] => 1 [95] => 1 [96] => 1 [97] => 1 [98] => 1 [99] => 1 ) ) If anybody has an idea why it happens, I'll be happy to get a note.

« previous php.notes (#71658) next »