PHP lcfirst()Functions
Examples
Convert the first character of "Hello" to lowercase:
<?php
echo lcfirst("Hello world!");
?>
echo lcfirst("Hello world!");
?>
Run example »
Definition and Usage
The lcfirst() function converts the first character of a string to lowercase.
Related functions:
- ucfirst()- Convert the first character of a string to uppercase.
- ucwords() - Convert the first character of each word in a string to uppercase.
- strtoupper()- Convert a string to uppercase.
- strtolower()- Convert a string to lowercase.
Syntax
lcfirst(string)
| Parameters | Description |
|---|---|
| string | Required. Specifies the string to convert. |
Technical Details
| Return value: | Returns the converted string. |
|---|---|
| PHP version: | 5.3.0+ |
PHP String Reference Manual Other Extensions