Capitalize the First Letter of Each Word in a String using PHP

ucwords function

<?php

$text = 'this is a simple text';
$result = ucwords($text);

echo $result; // This Is A Simple Text

Leave a Comment

Cancel reply

Your email address will not be published.