$result = strpos("haystack", "needle"); if ($result != false) { // text found }

php check if string contains a char

Similar Code Examples