str_ends_with function

<?php

$text = 'Hello world';
$result = str_ends_with($text, 'world');

echo $result ? 'Yes' : 'No';

Leave a Comment

Your email address will not be published. Required fields are marked *