Jump to content

Ultra Easy: Check if an array contains at least one key


johnsmith153

Recommended Posts

I need to check if an array contains at least one key.

 

I wont know the values of the keys (could be 34434, 20, anything)

 

but need to know if at least one value exist.

 

It is to stop " Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object " when my array is empty

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.