note 89749 modified in function.http-build-cookie by danbrown

From: Date: Sat, 21 Mar 2009 14:01:40 +0000
Subject: note 89749 modified in function.http-build-cookie by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-152259@lists.php.net to get a copy of this message
Note that you must cast the result of http_parse_cookie to an array before passing it to http_build_cookie (see http://bugs.php.net/bug.php?id=47740 ). Example: <?php $cookie = http_parse_cookie('RMID=2dab5fc9296749c2f28ec0b7; expires=Saturday, 20-Mar-2010 01:34:06 GMT; path=/; domain=.example.com'); var_dump(http_build_cookie((array)$cookie)); ?> --was-- Note that you must cast the result of http_parse_cookie to an array before passing it to http_build_cookie (see http://bugs.php.net/bug.php?id=47740 ). Example: $cookie = http_parse_cookie('RMID=2dab5fc9296749c2f28ec0b7; expires=Saturday, 20-Mar-2010 01:34:06 GMT; path=/; domain=.nytimes.com'); var_dump(http_build_cookie((array)$cookie)); http://php.net/manual/en/function.http-build-cookie.php

« previous php.notes (#152259) next »