extract a string from a string in php code example
Example 1: take last four digits php
$newstring = substr($dynamicstring, -7);
Example 2: php last of string till /
$string = 'Hello World Again';
$string = explode(' ', $string);
array_pop($string);
$string = implode(' ', $string);