English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Online Tools

PHP Basic Tutorial

PHP Advanced Tutorial

PHP & MySQL

Object Function

    PHP String String Functions Manual

    PHP ucfirst() Function Usage and Example

The ucfirst() function is used to convert the first character of the string to uppercase.

Syntax

ucfirst(string)

Definition and Usage

It is used to convert the first character of the string to uppercase

Convert the String to Lowercase

Return Value

It returns the modified string

ParameterNumber
1

Parameter and Description

String

Specify the String to Be Converted

Online Example3Try the following example, convert the "w

Example
   //Convert "w3codebox" Convert the First Character to Uppercase
   echo ucfirst("w3codebox());
?>
Test and See‹/›

Output Result

w3codebox

PHP String String Functions Manual