How to capitalize the first letter of a string and the first letter of a word in php
This article describes how to capitalize the first letter of a string and the first letter of a word in php. Share it with everyone for your reference. The specific analysis is as follows:
ucfirst can capitalize the first letter of the string, and ucwords can capitalize the first letter of each word in the string.
<?php
print ucfirst("hello world");
print ucwords("iam king of the jungle");
?>
Copy after login
I hope this article will be helpful to everyone’s PHP programming design.
http://www.bkjia.com/PHPjc/969343.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/969343.htmlTechArticleHow to capitalize the first letter of a string and the first letter of a word in php. This article explains how to capitalize the first letter of a string in php. Capitalization and the method of capitalizing the first letter of a word. Share it with everyone for your reference...