Hello, i'm writing a script with my friend for a sort of chatbot.
now we have this piece of code:
Now what it needs to do is: If it finds the word "snap" and the word "niet" in the send message, it will pick a randomly message (snap1, snap2, snap3, snap4 or snap5) and give that to variable $msgPHP Code:if(eregi('snap',$msg) && eregi('niet',$msg)) {
$array = array("snap1", "snap2", "snap3", "snap4", "snap5");
$msg = array_rand($array, 5);
}
(later on in the script it will search for $msg in my database)
But i keep getting my error message (the message when a word isn't in the database), how can i fix this?? =]

