how to get the last 3 letters of a string pp code example Example: take last four digits php $newstring = substr($dynamicstring, -7);