mb_strtolower

(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
<?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
<?php
$str = "Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός";
$str = mb_strtolower($str, 'UTF-8');
echo $str; // Prints τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός
?>

See also:

mb_strtoupper() -

mb_convert_case() -

strtolower() -

doc_php
2016-02-24 15:58:30
Comments
Leave a Comment

Please login to continue.