Posted By


iloveitaly on 06/05/09

Tagged


Statistics


Viewed 562 times
Favorited by 0 user(s)

array_keys_exist


/ Published in: PHP
Save to your folder(s)

like array_key_exists but accepts an array of key values to check


Copy this code and paste it in your HTML
  1. function array_keys_exist($keyArray, $array) {
  2. foreach($keyArray as $key) {
  3. if(!array_key_exists($key, $array))
  4. return false;
  5. }
  6.  
  7. return true;
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.