PHP ucwords() 函数
PHP 教程
· 2019-01-30 14:59:50
实例
把每个单词的首字符转换为大写:
<?php
echo ucwords("hello world");
?>
echo ucwords("hello world");
?>
定义和用法
ucwords() 函数把字符串中每个单词的首字符转换为大写。
注释:该函数是二进制安全的。
相关函数:
- ucfirst() - 把字符串中的首字符转换为大写
- lcfirst() - 把字符串中的首字符转换为小写
- strtoupper() - 把字符串转换为大写
- strtolower() - 把字符串转换为小写
语法
ucwords(string)
| 参数 | 描述 |
|---|---|
| string | 必需。规定要转换的字符串。 |
技术细节
| 返回值: | 返回已转换的字符串。 |
|---|---|
| PHP 版本: | 4+ |
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
Ajax for Web Application Developers
Kris Hadlock / Sams / 2006-10-30 / GBP 32.99
Book Description Reusable components and patterns for Ajax-driven applications Ajax is one of the latest and greatest ways to improve users’ online experience and create new and innovative web f......一起来看看 《Ajax for Web Application Developers》 这本书的介绍吧!