contains in string using 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: