How can I check if a string contains a certain substring in PHP? Example code: - Biz Tech

How can I check if a string contains a certain substring in PHP? Example code:

Listen
$string = "The quick brown fox jumps over the lazy dog";

if (strpos($string, "fox") !== false) {
    echo "The string contains 'fox'";
} else {
    echo "The string does not contain 'fox'";
}