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

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

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

if (strpos($string, "The") === 0) {
    echo "The string starts with 'The'";
} else {
    echo "The string does not start with 'The'";
}