PHP的lower()
函数实际上是strtolower()
函数,它用于将字符串中的所有字母转换为小写。strtolower()
函数接受以下参数:
$string
:必需。规定要转换为小写的字符串。示例:
<?php
$str = "Hello World!";
$lowercase_str = strtolower($str);
echo $lowercase_str; // 输出 "hello world!"
?>
注意:strtolower()
函数不会影响到原始字符串,而是返回一个新的已转换为小写的字符串。
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>