In this tutorial, we are going to see how to uppercase the first letter of each word in a string in PHP. You can use PHP’s ucwords() function to change the first letter of a string to upper case.
Uppercase the first letter of each word in a string
<?php $str = "welcom to stackhowto"; echo ucwords($str); ?>
Welcom To StackhowtoMCQPractice competitive and technical Multiple Choice Questions and Answers (MCQs) with simple and logical explanations to prepare for tests and interviews.Read More