JavaScript Snippets
April 12, 2011
// inArray() as like as PHP inArray function
function inArray(needle, theArr){
for(var i=0; i<theArr.length; i++){
if(theArr[i] == needle){
return true;
}
}
return false;
}
A winner is not the one who never fails, but is the one who never quits