Fri, 17 May 2024


How to make the first character in a string uppercase?

By: Peter, NetArt Media
Thu, 15 October 2020

You may use the special PHP function ucfirst.

<?php

$myText="i have a car";

echo ucfirst($myText);

?>

will display:

I have a car


Category: PHP Examples
Share this post:



See All Scripts






Subscribe for our newsletter

Receive the latest blog posts direct in your mailbox