I have the array list: $wordChoices = array(“soccerball”,"basketball ",“baseball”, “football”);
How do I see if what the user inputed is a valid guess in the array? This is what I have, and it doesn’t work.
} else if (in_array($_POST[‘myguess’], $wordChoices)){
$message = “Hey, that’s not even a valid guess. Try again”;
}
after
lets say baseball was the correct word. how do i compare that?
Thanks