in reply to Re: Printing last two characters
in thread SOLVED Printing last two characters

Note that
substr($str, -2, 2)
can also be written as
substr($str, -2)
since substr defaults to extracting the rest of the string.