|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-01-28 20:08 UTC] yohgaki@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 11:00:01 2025 UTC |
When using php sessions with a registered array variable; if that variable is set before the call to session_start() is made, instead of overwriting the variable with the stored session value I request php check if that variable is already set and do an array_merge() on the two arrays. This is useful for accumulating key and value pairs. Example first.. <? $input = array(); session_register("input"); ?> then.. <? // Upon form submission at session_start() the input variable is overwritten session_start(); var_dump($input); ?> <form> <input type="text" name="input[<?echo time()?>]"> <input type="submit"> </form>