php if string costains word code example
Example 1: php find if string contains
if (strpos($string, 'substring') !== false) {
// do stuff
}
Example 2: php find if substring is in string
$result = strpos("haystack", "needle");
if ($result != false)
{
// text found
}