in reply to Find odd/even elements of array

Why not get the database to do it with a table join?

Then you'd only need one query ;)