For example, I’ve always did something like if($word=='hi' || $word=='test' || $word=='blah'...
This can become quite long. If there a simple way to combine these statements into one statement?
For example, I’ve always did something like if($word==’hi’ || $word==’test’ || $word==’blah’… This can
Share
The best way I can think of is using
in_array():http://php.net/manual/en/function.in-array.php