ledtear wrote:The problem is that when I keep hitting refresh on the page this code is on, about the second time i hit refresh, the sizeof turns to 1 instead of 0?
After adding enough code to make something that would run I get the expected behaviour: 0 0 0 0 .... Could you post a complete script - as short as possible - that shows the problem?
I try to print out $_SESSION['cou'][0] but there is nothing there
Try using [man]print_r[/man] or one of the other variable-dumping debugging functions; then you won't have to guess what it might be called.
should this be happening?
No, and like I said, Works For Me.
Of course, if you're just going to be adding to the array once it's created,
$_SESSION['cou'][] = "something";
is legal even if $_SESSION['cou'] doesn't already exist.