It’s very easy like this :

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

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

Leave a Reply

Your email address will not be published.