
php将字符串转换成小写的方法是:可以通过strtolower()函数来实现。该函数可以把字符串转换成小写。函数语法:【strtolower(string)】,具体使用方法如【strtolower($string);】。
(推荐教程:php教程)
函数介绍:
strtolower() 函数把字符串转换为小写。
语法:
strtolower(string)
参数介绍:
string 必需参数。规定要转换的字符串。
返回值:
返回转换为小写的字符串。
代码实现:
<?php
$string = "Learn PHP string functions at jb51.net";
$lower = strtolower($string);
$upper = strtoupper($string);
print("$lower\\\\n");
print("$upper\\\\n");
print("\\\\n");
?>
更多关于云服务器,域名注册,虚拟主机的问题,请访问西部数码官网:www.west.cn


