how to get last 2 chars from string php code example
Example 1: take last four digits php
$newstring = substr($dynamicstring, -7);
Example 2: php nth characters from end of string
$rest = substr("abcdef", -3, 1); // returns 'd'
$newstring = substr($dynamicstring, -7);
$rest = substr("abcdef", -3, 1); // returns 'd'