Search code snippets, questions, articles...

Capitalize text PHP

ucfirst() method can be used to capitalize text in PHP
<?php
    $txtStr = "hello world";
    echo ucfirst($txtStr);
    //prints - Hello world
?>
Output
Hello world
Was this helpful?
0 Comments
Programming Feeds
Learn something new everyday on Devsheet