Originally posted by nca
How can I have a php script find out if a variable contains a certain word? It is probably somthing very simple, but I am not able to find it easily at php.net.
Check out the manual at php.net, under 'string functions...'
It's possible you want substr(), or perhaps strtok(), and there are many, many others, but it really depends on the variable's content and the nature of the "word" you wish to grep....
If the "variable" happens to be an array, I recently was pointed to in_array() by a senior member of the forums...wonderful place, this......
dalecosp