note 17177 added to function.session-get-cookie-params

From: Date: Wed, 28 Nov 2001 20:16:51 +0000
Subject: note 17177 added to function.session-get-cookie-params
Groups: php.notes 
Request: Send a blank email to php-notes+get-21390@lists.php.net to get a copy of this message
Due to the fact that the function returns an array, after some trial, tribulation and endless loops, I think this is the best way to actually return and view the session_get_cookie_params() information: $s=session_get_cookie_params(); while (list($key, $value) = each($s)) { echo $key." ".$value."<br>"; } If you stick the session_get_cookie_params() into the each() element of the loop (rather than assigning it to a variable, $s in the example,) it causes an endless loop. -- http://www.php.net/manual/en/function.session-get-cookie-params.php http://master.php.net/manage/user-notes.php?action=edit+17177 http://master.php.net/manage/user-notes.php?action=delete+17177 http://master.php.net/manage/user-notes.php?action=reject+17177

« previous php.notes (#21390) next »