I'm sure there must be an easy way to get nth character from the end of string.
For example:
$NthChar = get_nth('Hello', 3); // will result in $NthChar='e'
I'm sure there must be an easy way to get nth character from the end of string.
For example:
$NthChar = get_nth('Hello', 3); // will result in $NthChar='e'
Just do this
$rest = substr("abcdef", -3, 1); // returns 'd'