PHP ucfirst() Function

Syntax : ucfirst($str)

 ucfirst() function returns string converting first character into uppercase.

Example 1 :

 

<?Php

$str = "welcome to my WORLD!"; 

echo ucfirst($str); 

//output : Welcome to my WORLD! 

?>