How to get last character of a string in PHP?
The substr() function returns a part of a string.
Syntax
<?php
$string=”Welcome to PHPGURUKUL”;
echo substr($string,-1);
?>
OUTPUT:
L
The post How to get last character of a string in PHP? appeared first on PHPGurukul.