in_array()

function in_array( what, where ){
var a=false;
for(var i=0;i<where.length;i++){
if(what == where[i]){
a=true;
break;
}
}
return a;
}

source

Leave a Reply