Hi -
I am trying to search some free text ($text) with different sentences specified within an array ($array) so if $text contains any of the $array values the script will do one thing but if not it will do another.
I have tried using:
//**array***
$errors = array(
"small fish",
"fat cats",
"ugly dogs");
//**fuction***
function checkit($error){
if (eregi($data,$error)) {
$result = "1";
}
else {
$result = "2";
}
echo ("$result");
}
//**call to function***
array_walk($errors, checkit);