Posted by Peter Pei on 01/07/08 02:15
With a usual (well bothing should be unusual) array,
$a[] = "a"; $a[] ="b" sets the first two elements of the array.
I expect somthing like this to work in exactly the same way:
start_session();
$_SESSION[] = $_POST["a"];
$_SESSION[] = $_POST["b"];
So what I meant is that run this page, PHP should set the first 4 elements,
but what actually happened was the second round overwrites the first one,
and the array ends up only have the first 2 elements set.
[Back to original message]
|