(PHP 4 >= 4.3.0, PHP 5, PHP 7)
Make a string lowercase
string mb_strtolower ( string $str [, string $encoding = mb_internal_encoding() ] )
Returns str
with all alphabetic characters converted to lowercase.
Parameters:
str
The string being lowercased.
encoding
The encoding
parameter is the character encoding. If it is omitted, the internal character encoding value will be used.
Returns:
str
with all alphabetic characters converted to lowercase.
Examples:
mb_strtolower() example
1 2 3 4 5 | <?php $str = "Mary Had A Little Lamb and She LOVED It So" ; $str = mb_strtolower( $str ); echo $str ; // Prints mary had a little lamb and she loved it so ?> |
mb_strtolower() example with non-Latin UTF-8 text
1 2 3 4 5 | <?php $str = "Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός" ; $str = mb_strtolower( $str , 'UTF-8' ); echo $str ; // Prints τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός ?> |
See also:
Please login to continue.