How to delete the first few characters from a php string
The example is as follows:
Yes Use the substr function to return a substring starting from the 5th character:
$str = "The quick brown fox jumps over the lazy dog." $str2 = substr($str, 4); // "quick brown fox jumps over the lazy dog."
substr definition and usage
## The #substr() function returns a portion of a string. Note: If the start parameter is negative and length is less than or equal to start, length is 0. Syntaxsubstr(string,start,length)
PHP Video Tutorial"
The above is the detailed content of How to delete the first few characters from a php string. For more information, please follow other related articles on the PHP Chinese website!