Posted By

iloveitaly on 06/05/09


php list check array keys exist

Versions (?)


 / Published in: PHP

like arraykeyexists but accepts an array of key values to check

  1. function array_keys_exist($keyArray, $array) {
  2. foreach($keyArray as $key) {
  3. if(!array_key_exists($key, $array))
  4. return false;
  5. }
  7. return true;
  8. }

Report this snippet  


RSS Icon Subscribe to comments
Posted By: MMDeveloper on June 11, 2009

short, sweet, to the point, and has a valid everyday use.. nice.

You need to login to post a comment.