Current Location: Home> Function Categories> ucfirst

ucfirst

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

Example

Convert the first character of "hello" to uppercase:

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token keyword">echo</span> <span class="token function">ucfirst</span> <span class="token punctuation">(</span> <span class="token string double-quoted-string">"hello world!"</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

Try it yourself

Similar Functions
Popular Articles