mb_strtolower

(PHP 4 >= 4.3.0, PHP 5, PHP 7)

mb_strtolower — ʹ�ַ���Сд

˵��

mb_strtolower ( string $str [, string $encoding = mb_internal_encoding() ] ) : string

����������ĸ�ַ�ת����Сд�� str��

����

str

Ҫ��Сд���ַ�����

encoding

encoding ����Ϊ�ַ����롣���ʡ�ԣ���ʹ���ڲ��ַ����롣

����ֵ

������ĸ�ַ��ѱ�ת����Сд�� str��

Unicode

������� Unicode ���Ե���Ϣ����μ� » http://www.unicode.org/unicode/reports/tr21/��

�� strtolower() ��ͬ���ǣ�"��ĸ"�ַ��ļ���Ǹ����ַ��� Unicode ���ԡ� ��˺�������Ϊ�������������õ�Ӱ�죬��żת���������"��ĸ"���Ե��ַ�������Ԫ������ A��?����

����

Example #1 mb_strtolower() ����

<?php
$str 
= "Mary Had A Little Lamb and She LOVED It So";
$str = mb_strtolower($str);
echo 
$str; // ����� mary had a little lamb and she loved it so
?>

Example #2 ������ UTF-8 �ı��� mb_strtolower() ����

<?php
$str 
= "��?�֦ɦҦӦ� ����?�ЦǦ� �¦���?? �צǦ�?�ͦ� �æ�, �ĦѦ��ҦʦŦ�?�ƦŦ� �Ԧ�?�� �ͦئȦѦ�? �ʦԦ�??";
$str = mb_strtolower($str, 'UTF-8');
echo 
$str; // ��� ��?�֦ɦҦӦ� ����?�ЦǦ� �¦���?? �צǦ�?�ͦ� �æ�, �ĦѦ��ҦʦŦ�?�ƦŦ� �Ԧ�?�� �ͦئȦѦ�? �ʦԦ�??
?>

�μ�