note 105932 added to function.setcookie

From: Date: Mon, 26 Sep 2011 16:44:31 +0000
Subject: note 105932 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-183455@lists.php.net to get a copy of this message
vanclute at gmail dot com: Don't tear out your hair. Variable names expand nicely within quotes, but when you use an index reference it fails to work as you expect. Either leave out the quotes or put curly braces around the expression you want expanded. either setcookie($cookiename[id]); or setcookie("{$cookiename[id]}"); would have worked. This applies to all quoted strings, not just for the setcookie function. Cheers! ---- Server IP: 69.147.83.197 Probable Submitter: 64.85.197.99 ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- https://master.php.net/note/edit/105932 Del: integrated -- https://master.php.net/note/delete/105932/integrated Del: useless -- https://master.php.net/note/delete/105932/useless Del: bad code -- https://master.php.net/note/delete/105932/bad+code Del: spam -- https://master.php.net/note/delete/105932/spam Del: non-english -- https://master.php.net/note/delete/105932/non-english Del: in docs -- https://master.php.net/note/delete/105932/in+docs Del: other reasons-- https://master.php.net/note/delete/105932 Reject -- https://master.php.net/note/reject/105932 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#183455) next »