Functions::isIn($needle,$haystack[,$haytack...])
Version 4
Check if needle is found in haystack
Version 4
Check if needle is found in haystack
A: Replace PHP stripos() with more readable form and better lang -support. (Is case insensitive) B: Check if given valus is found in array
Bool
Note:
Check if needle is in haystack:
if ( isIn('me','memory') ){
// me was found
}
Multiple needles:
if ( isIn( Array('me','ney') , 'money' ) ){
// me and/or you was found in money
}
Check if needle is same as one of preceding values:
if ( isIn('name','phone','name') ){
// name is one of the preceding values
}
Check if needle is in array
if ( isIn('name',Array('phone','name') ){
// name is a value in array
}