Why iterate? Just use array_key_exists()...