I need to get the last character of a string.
Say I have "testers" as input string and I want the result to be "s". how can I do that in PHP?
Php – How to get the last char of a string in PHP
PHPstring
Related Topic
- C++ – How to iterate over the words of a string
- Java – How to read / convert an InputStream into a String in Java
- Python – How to get a substring of a string in Python
- Javascript – How to replace all occurrences of a string in JavaScript
- Javascript – How to check whether a string contains a substring in JavaScript
- Php – Reference — What does this symbol mean in PHP
- Java – How to convert a String to an int in Java
- Java – Why is char[] preferred over String for passwords
Best Answer
Or, for multibytes strings :