Current Location: Home> Function Categories> lcfirst

lcfirst

Set the first character of the string to lowercase
Name:lcfirst
Category:String
Programming Language:php
One-line Description:Converts the first character of the string to lowercase.

Definition and usage

The lcfirst() function converts the first character in the string to lowercase.

Related functions:

  • strtolower() - Convert strings to lowercase
  • strtoupper() - Convert string to uppercase
  • ucfirst() - Convert the first character in a string to uppercase
  • ucwords() - Convert the first character of each word in a string to uppercase

Example

Convert the first character of "Hello" to lowercase:

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

Try it yourself

grammar

 lcfirst ( string )
parameter describe
string Required. Specifies the string to be converted.
Similar Functions