This php function searches a part of string inside a large string, return true if found.
function strinstr($find, $str){
$find = preg_quote($find);
if(preg_match('~'.$find.'~',$str)){
return TRUE;
}
return FALSE;
}
//exemple of use
$sStr = 'hello my name is billy bob joe.';
if(strinstr('ralph', $sStr))
echo 'found';
else
echo 'not found';