Its syntax is: string substr (string string, int start [, int length])
If start is positive, returned substring starts at the start'th position of the string.
If start is negative, returned substring starts at the string (length - start'th position of the string.
If length is positive, the returned substring consists of the characters between start and (start + length). If this distance is greater than the distance between start and the end of string, then only the substring between start and the string's end will be returned.
If length is provided and is negative, the returned substring will end length characters from the end of string.
<?
$car = "1234567890";
$model = substr($car, 6);
print $model;
?>
|