check if string has a string php

PHP
$myString = 'Hello Bob how are you?';
if (strpos($myString, 'Bob') !== false) {
    echo "My string contains Bob";
}if (strpos($string, 'substring') !== false) {
	// do stuff 
}
Source

Also in PHP: