![]() |
php实现字符串首字母大写和单词首字母大写的方法
本文实例讲述了php实现字符串首字母大写和单词首字母大写的方法。分享给大家供大家参考。具体分析如下:
ucfirst可以对字符串首字母进行大小,ucwords可以对字符串中每个单词的首字母大写输出 <?php print ucfirst("hello world"); print ucwords("iam king of the jungle"); ?> |
| All times are GMT +8. The time now is 06:06 AM. |
Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.