how to get first 2 digits of string php code example
Example 1: take last four digits php
$newstring = substr($dynamicstring, -7);
Example 2: php get first character of string
$firstStringCharacter = substr("hello", 0, 1);
Example 3: print only some characters of a string in php
substr(string,start,length)