I cannot find a similar function to Cs "instr". I assume there must be one in php, but searching the manual has proven fruitless.
To elaborate, "IF pattern is in $string" return true
Any help appreciated,
Thanks.
i'm sure you won't find one, are you looking for getting a string of characters from a curses window? Cause if you are, i'm pretty sure that its currently not available in php
All I want to do is to determine if a pattern is contained in a string.
$string = "These are words";
if instr("words",$string) {
echo "Words is in the string!";
}
Surely that must be possible?
Of course it is. Start here: http://www.php.net/manual/en/function.strstr.php
PHP also supports a full complement of regular expressions if you need a more high powered search.