ucfirst(): Converting the first char to upper case

$output=ucfirst($input_str);
ParameterDESCRIPTION
$input_strRequired : Input string
We can use php string function ucfirst() to change all first character of string to upper case

Now let us try with one example

Here is a string variable $str with one string inside it. We will use ucfirst() to capitalize first chars of the string.
$str="welcome to plus2net.com";
$str=ucfirst($str);
echo $str;
The output is here
Welcome To plus2net.com

DEMO

Output :


plus2net.com




PHP String Functions

Post your comments , suggestion , error , requirements etc here .




We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2020 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer