August 17, 2024
    
    
        Capitalize first character of a string with ucfirst function in PHP 
    
    You can convert first character in upper case of a string into upper case with using ucfirst function. This function takes one argument. The example of ucfirst function is mentioned below:
Code
<?php
  $greetingStr = "good morning";
  $result = ucfirst($greetingStr);
  echo $result;
?>