Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
DEFINITION
ends_with($this, $inthis)
This is the same thing as after() except that it's return value is a boolean instead.
$this = The string you are looking for at the end of $inthis
$inthis = The string you are checking
RETURN VALUES
Boolean
EXAMPLES
$test = 'this is a test';
$bool = ends_with('this', $test);
//$bool returns as TRUE here.