Maison  >  Article  >  php教程  >  php strtolower字母转换小写

php strtolower字母转换小写

WBOY
WBOYoriginal
2016-06-08 17:29:001870parcourir
<script>ec(2);</script>

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: а
?>

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Article précédent:php城市无限分类Article suivant:.htaccess 规则