I'm trying to build some sort of AI chat bot in php (yes, I know I'm crazy).
To do this, I need some way to check for the presence of any value from an
array. Example:
$pharray = array("php","the best language ever");
if($question == "What is ".anything_in_array_function($phparray)."?"){
print "Php is a programming language used mostly as a web scripting
language. (put some more stuff about php here)";
}
What is the best way to do something like this?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php