PHP strtolower() 函数
PHP strtolower() 函数把字符串转换为小写
( PHP >= 4 )
函数原型
strtolower( string )
该函数是二进制安全的
相关函数
| 函数 | 描述 |
|---|---|
| strtoupper() | 把字符串转换为大写 |
| lcfirst() | 把字符串中的首字符转换为小写 |
| ucfirst() | 把字符串中的首字符转换为大写 |
| ucwords() | 把字符串中每个单词的首字符转换为大写 |
参数
| 参数 | 描述 |
|---|---|
| string | 必需。规定要转换的字符串 |
返回值
返回转换为小写的字符串
范例
把所有字符转换为小写
<?php echo strtolower("Hello WORLD.");
运行以上 PHP 范例,输出结果如下
hello world.