It’s very easy like this :

$var = 'Hello my name is Alex?';

if (strpos($var, 'name') !== false) {
    echo 'true';
}