This video is made for learning about String Function and sub string in PHP.
substr — Return part of a string
Description ¶
string substr ( string $string , int $start [, int $length ] )
Returns the portion of string specified by the start and length parameters.
Parameters ¶
string
The input string. Must be one character or longer.
start
If start is non-negative, the returned string will start at the start'th position in string, counting from zero. For instance, in the string 'abcdef', the character at position 0 is 'a', the character at position 2 is 'c', and so forth.
If start is negative, the returned string will start at the start'th character from the end of string.
If string is less than start characters long, FALSE will be returned.
The substr function in PHP is used to retrieve a portion of the string. The syntax of the substr function is:
substr ('string', position_start, substr_length)
where position_start is the starting point (the first character has a position of 0). if position_start is a negative number, the starting position is the -(position_start)th character from the end. substr_length is the length of the string to be returned. If substr_length is a negative number, that means substr_legnth characters will be omitted from the end of the string.
Auf dieser Seite können Sie das Online-Video Learn PHP Tutorial 29 String Function and substring mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Champion Mahipal 31 Dezember 2015 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 237 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!