How to get first character in string ?


   <?php
          $str = "jswebsolutions "; 
          $first_char = strtoupper(substr($str , 0 , 1));
           echo $first_char;
   ?>
   

   Output = J