Return to Snippet

Revision: 56508
at March 31, 2012 20:32 by satie83


Initial Code
function endsWith($stringComplete, $endString)
{
  $length = strlen($endString);
  $start  = $length * -1; //negative
  return (substr($stringComplete, $start) === $endString);
}

Initial URL

                                

Initial Description
This function checks if the $stringComplete variable ends with the string $endString.

Initial Title
PHP - Function endswith

Initial Tags
php

Initial Language
PHP