This is a discussion on Wow, is it a bug? Session variable is lost if array with the samename is created! within the PHP Language forums, part of the PHP Programming Forums category; $_SESSION["a"] = "bitch"; $a = array(); print_r($_SESSION["a"]); // it shows array()!!! If make $a ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
alexandis@gmail.com pisze:
> $_SESSION["a"] = "bitch"; $a = array(); print_r($_SESSION["a"]); > // it shows array()!!! > If make $a as variable - $_SESSION["a"] preserves its value... > > p.s. PHP4 no it is not a bug. but it has not not been default behaviour since 22-Apr-2002 search for register_globals in your php.ini -- Piotr Siudak |