I'm fairly new to sessions so please bear with me...
I'm happy with start_session(), unset($_SESSION['my_var']), etc. when I'm using single variables. However I hit problems when my_var is an array. I can't seem to unset it.
<?php
session_start();
unset($SESSION['user_count']);
unset($SESSION['user_array']);
?>
...HTML stuff...
loop $i times then end loop....
$SESSION['user_array'] = $user_array;
$SESSION['user_count'] = $i ;
I can then access the session variables in other pages as expected. However if I reload this first page, the user_count gets unset but the user_array adds the data on top of the old data (ie, doesn't clear the contents of user_array first).
Am I being stupid? Thanks for any help