Using substr() with negative start
<? print substr('This is a test. This is another test.',-6); print substr('This is a test. This is another test.',-17,5); ?>