note 43553 added to function.setcookie

From: Date: Fri, 25 Jun 2004 07:25:08 +0000
Subject: note 43553 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-71648@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+43553 Delete -- http://master.php.net/manage/user-notes.php?action=delete+43553&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+43553&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#71648) next »