php get last x characters of a string 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'