Use array_keys instead of array_flip