Adjust the length of strings in PHP
$var ="abcdefgh";
$var1 = substr($var, 3); //takes of first 3
$var1 is now "defgh"
$var2 = substr_replace($var ,"",-3); //takes off last 3
$var2 is now "abcde"
Get first 3 characters
$var3 = substr($var, 0, 3);
$var3 is now "abc"











