Just a small question: how do you change $i? Looks like you should have smth like:
for ($i=0;$i<=5;$i++)
for ($x=2;$x<=5;$x++)
{ $correct[$i]=$split[$i][$x];
}
Although if $i is defined in your programm, this may not be the cause, but anyway, this cycle does not look reasonable with the same $i value.