php strtolower字母转换小写
php strtolower字母转换小写
串用strtolower(string $str )
返回字符串转换为小写的所有字母字符。
请注意,'字母'是当前语言环境决定的。这意味着,即如元音变音默认的"C"语言环境,字符甲(一)将不转换
$str输入字符串。报告错误返回值返回小写的字符串。
<?php $str = "Mary Had A Little Lamb and She LOVED It So"; $str = strtolower($str); echo $str; // Prints mary had a little lamb and she loved it so ?>
UTF 8使用mb_convert_case
exampel
<?php $string = "А"; $string = mb_convert_case($string, MB_CASE_LOWER, "UTF-8"); echo $string; //output is: а ?>
本文地址:http://www.phprm.com/code/805cd7d41d20a10b71b35e1a8f2b8596.html
转载随意,但请附上文章地址:-)