We can capitalize the first character of each word using a simple php
function. Use the below PHP function to uppercase the first character of
each word in a string.
The output of the above code will be:PHP Code:<?php
$STRING = "hello, i love php.";
$STRING = ucwords($STRING);
echo $STRING;
?>
Similarly we can use the above function at anywhere in PHP as required.Code:Hello, I Love Php.
No comments:
Post a Comment