How to get last character of string in php?
To find the last character of a PHP string, use the substr() function in the following way:
BY Best Interview Question ON 18 Aug 2020
Example
substr("best interview question", -1);
Output:
n
To find the last character of a PHP string, use the substr() function in the following way:
substr("best interview question", -1);
Output:
n