$string = "The quick brown fox jumps over the lazy dog"; if (substr($string, -3) == "dog") { echo "The string ends with 'dog'"; } else { echo "The string does not end with 'dog'"; }
$string = "The quick brown fox jumps over the lazy dog"; if (substr($string, -3) == "dog") { echo "The string ends with 'dog'"; } else { echo "The string does not end with 'dog'"; }