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

php strtolower字母转换小写

WBOY
WBOYOriginal
2016-06-08 17:29:001867browse
<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: а
?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php城市无限分类Next article:.htaccess 规则