Citefy-Landing_page/functions.php
// Seeing if a string ends with a certain string
Seeing if a string ends with a certain string
Seeing if a string ends with a certain string
function endsWith($haystack, $needle) {
    $length = strlen($needle);
    if ($length == 0) {
        return true;
    }
    return (substr($haystack, -$length) === $needle);
}
function endsWith ( $ haystack , $ needle ) { $ length = strlen ( $ needle ) ; if ( $ length == 0 ) { return true ; } return ( substr ( $ haystack , - $ length ) === $ needle ) ; }
Seeing if a string ends with a certain string
Seeing if a string ends with a certain string