hmm..i m not sure if this is wat u want, but i think u might not need to create an array to compare.

if ur id in first query is equal to the enemies in second query.


SELECT id,name,founder FROM $tab[crew] WHERE id>0 AND id NOT IN (SELECT enemies FROM $tab[crew] WHERE id='$cid')
ORDER BY name ASC;...