read the charector from position in php code example
Example 1: take last four digits php
$newstring = substr($dynamicstring, -7);
Example 2: print only some characters of a string in php
substr(string,start,length)
$newstring = substr($dynamicstring, -7);
substr(string,start,length)