
If given a length and positive, the returned string will contain the maximum length characters starting from Start (depending on the length of the string). Its default value is the end of the string.

Used to specify the length of the return string. Returns FALSE if the string is less than the start character. If start is negative, the returned string starts at the beginning character at the end of the string. If start is non-negative, the string returned will start at the beginning of the string and count from zero. Used to specify the starting position from the return string. Used to specify an input string that must be one character or longer. The mb_substr () function gets part of the string The trim () function is used to remove whitespace characters or other predefined characters from the sides of a string. The preg_match () function is used to perform matching regular expressions

The substr_replace () function is used to replace the substring of a string The STRRCHR () function looks up the position of the last occurrence of a string in another string and returns all characters from that position to the end of the string Other versions get the string from the Start position. In PHP versions 5.2.2 through 5.2.6, this returns FALSE if the start parameter represents a negative truncation or an out of bounds position. Note: the substr() function is available in PHP 4, PHP 5, PHP 7. If the start parameter is negative and the length is less than or equal to start, the length becomes 0 Return value: This function returns the part of the string to be extracted, FALSE on failure, or an empty string. Next in the article will be for you to introduce its usage in detail, there is a certain reference value, I hope to help you. Today I’m going to share with you the substr function in PHP, which is used primarily to return a portion of the string specified by the start and length parameters. The substr function is used to return a portion of the string specified by the argument, and to return a portion of the string by setting the values for Start and Ength
