check if a text include a word php

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

Also in PHP: