您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

分享php中几个字符函数小结_PHP教程

2025/12/5 10:27:55发布26次查看
下面小结php中的几个字符函数, 小结一下:
1)ucfirst
   将首字母变大写,比如
  $string = this is my web development blog;
echo ucfirst($string);
// output: this is my web development blog
2) lcfirst,将首字母变小写
   $string = this is my web development blog;
echo lcfirst($string);
// output: this is my web development blog
3)strtoupper,将整个字符串变大写
   $string = this is my web development blog;
echo strtoupper($string);
// output: this is my web development blog
4)strtoplower,将整个字符串变小写
   $string = this is my web development blog;
echo strtolower($string);
// output: this is my web development blog
5)ucwords(),可以将句子中每个单词的第一个字母变大写,比如
   $string = this is my web development blog;
echo ucwords($string);
// output: this is my web development blog
http://www.bkjia.com/phpjc/478433.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/478433.htmltecharticle下面小结php中的几个字符函数, 小结一下: 1)ucfirst 将首字母变大写,比如 $string = this is my web development blog; echo ucfirst($string); // output: th...
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product