php check has some string code example
Example 1: php string contains
$mystring = 'abc';
$findme = 'a';
$pos = strpos($mystring, $findme);
Example 2: if text contains word then in php
if (strpos($haystack,$needle) !== false) {
echo "$haystack contains $needle";
}