So This part of my code:
print_r($_SESSION['T']);
$T = array_values($data2);
print_r($_SESSION['T']);
Outputs this:
Array ( [0] => NZL ) Array ( [0] => ENG [1] => NZL )
That line is the first time $T is declared. As far as I can tell there should be NO reason for $_SESSION[‘T’] to gain an entry and its definitely causing me problems.
Might be good to note that after that array_values call, the var $T looks like:
Array ( [0] => ENG [1] => NZL )
Which is what the second print of $_SESSION[‘T’] is displaying.
Let me know if you can think of any reason this might be happening, thanks
Looks like you might have Register Globals turned on.
The idea was that – with register globals – you could use a variable
$Tas a shorthand for$_GLOBALS['T']… or$_GET['T']or$_POST['T']or (of course)$_SESSION['T'].If it sounds like a bad idea, that’s because it is (was) and has now been so aggressively discouraged that it is deprecated and usually off by default.