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