note 51586 added to function.setcookie

From: Date: Tue, 05 Apr 2005 07:22:59 +0000
Subject: note 51586 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-87474@lists.php.net to get a copy of this message
I use the following code but that show error Parse error: parse error in c:\apache\htdocs\cookies\c.php on line 10 <?php // set the cookies setcookie("cookie[three]", "cookiethree"); setcookie("cookie[two]", "cookietwo"); setcookie("cookie[one]", "cookieone"); // after the page reloads, print them out if (isset($_COOKIE['cookie'])) {    foreach ($_COOKIE['cookie'] as $name => $value) { echo "$name : $value <br />\n";  } } ?> ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51586 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51586&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51586&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51586&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51586&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51586&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51586&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87474) next »