strtolower — 将字符串转化为小写,strtoupper — 将字符串转化为大写

作者:Liaodeity - 2015年07月20日

    php转换小写函数

说明:

string strtolower ( string $str   )

string 中所有的字母字符转换为小写并返回。 

参数 :

str 输入字符串。

返回值 :

返回转换后的小写字符串。

例子:

<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtolower($str);
echo $str; // 打印 mary had a little lamb and she loved it so
?>

另外还有几个相类似的函数,大家可以查看手册用法

•strtoupper() - 将字符串转化为大写

•ucfirst() - 将字符串的首字母转换为大写

•ucwords() - 将字符串中每个单词的首字母转换为大写

•mb_strtolower() - 使字符串小写


本文作者: Liaodeity

本文链接: https://www.jianbaizhan.com/article/230.html

版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 3.0 许可协议。转载请注明出处!


 请勿发布不友善或者负能量的内容。审查将对发布广告等违规信息进行处罚!