English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
PHP String Character String Functions Manual
The lcfirst() function is used to convert the first character of a string to lowercase.
string lcfirst ( string $str )
It is used to make the first character of the string lowercase.
Related Functions:
ucfirst() - Convert the first character of the string to uppercase.
ucwords() - Convert the first character of each word in the string to uppercase.
strtoupper() - Convert the string to uppercase.
strtolower() - Convert the string to lowercase.
It returns the result string.
Serial Number | Parameters and Description |
---|---|
1 | str (required) Input String |
Try the following example to convert the first character of a string to lowercase:
<?php //Convert the first character of a string to lowercase. $input = 'w3codebox'; $input = lcfirst($input); echo $input; ?>Test and See‹/›
Output Result-
w3codebox