Posted By

maceblue on 07/30/12


Tagged

inarray


Versions (?)

in_array (PHP-like)


 / Published in: JavaScript
 

like PHP function in_array

  1. function in_array(item,arr) {
  2. for (p=0;p<arr.length;p++) if (item == arr[p]) return true;
  3. return false;
  4. }

Report this snippet  

You need to login to post a comment.