php strtolower字母转换小写
串用strtolower(string $str )
返回字符串转换为小写的所有字母字符。
请注意,'字母'是当前语言环境决定的。这意味着,即如元音变音默认的“C”语言环境,字符甲(一)将不转换
$str输入字符串。报告错误返回值返回小写的字符串。
$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
$string = "А";
$string = mb_convert_case($string, MB_CASE_LOWER, "UTF-8");
echo $string;
//output is: а
?>