Answers for "keep only last four characters from a string in php"

PHP
24

php remove last char from string

//Remove the last character using substr
$string = substr($string, 0, -1);
Posted by: Guest on April-02-2020
11

get last character of string php

substr("testers", -1); // returns "s"
Posted by: Guest on March-05-2020

Code answers related to "keep only last four characters from a string in php"

Browse Popular Code Answers by Language