slice last char of string php code example
Example 1: get last character of string php
substr("testers", -1); // returns "s"
Example 2: php remove last character from string
$hell = substr('hello', 0, -1);
substr("testers", -1); // returns "s"
$hell = substr('hello', 0, -1);