in reply to comparing elements of two arrays
If they're numbers, then of course it should be if ($array2[2] == $array1[2] ). If they're strings then you're doing it right.
andy.