PHP lcfirst() 函数

PHP 教程 · 2019-01-29 15:57:10

实例

把 "Hello" 的首字符转换为小写。:

<?php
echo lcfirst("Hello world!");
?>

定义和用法

lcfirst() 函数把字符串中的首字符转换为小写。

相关函数:

  • ucfirst() - 把字符串中的首字符转换为大写。
  • ucwords() - 把字符串中每个单词的首字符转换为大写。
  • strtoupper() - 把字符串转换为大写。
  • strtolower() - 把字符串转换为小写。

语法


lcfirst(string)


参数 描述
string 必需。规定要转换的字符串。

技术细节

返回值: 返回已转换的字符串。
PHP 版本: 5.3.0+

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

Pro CSS Techniques

Pro CSS Techniques

Jeff Croft、Ian Lloyd、Dan Rubin / Apress / 2009-5-4 / GBP 31.49

Web Standards Creativity: Innovations in Web Design with CSS, DOM Scripting, and XHTML一起来看看 《Pro CSS Techniques》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

XML、JSON 在线转换
XML、JSON 在线转换

在线XML、JSON转换工具