PHP lcfirst () function
Examples
The "Hello" in the first character converted to lowercase. :
<?php
echo lcfirst("Hello world!");
?>
echo lcfirst("Hello world!");
?>
Running instance »
Definition and Usage
lcfirst () function to convert the first character in the string to lowercase.
Related functions:
- ucfirst () - the first character of the string converted to uppercase.
- ucwords () - the first character of each word in a string to uppercase.
- the strtoupper () - Convert a string to uppercase.
- strtolower () - Convert a string to lowercase.
grammar
lcfirst( string )
参数 | 描述 |
---|---|
string | 必需。规定要转换的字符串。 |
technical details
return value: | Returns the converted string. |
---|---|
PHP version: | 5.3.0+ |
PHP String Reference