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.
In questa pagina del sito puoi guardare il video online Learn PHP Tutorial 29 String Function and substring della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Champion Mahipal 31 dicembre 2015, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 237 volte e gli è piaciuto 3 spettatori. Buona visione!