Search for a value in an array

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

Copy this code and paste it in your HTML
  1. function array_value_exists($value, $array)
  2. {
  3. $array = array_flip($array);
  5. return (array_key_exists($value, $array));
  6. }

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.