php ucwords() 函数将字符串中每个单词的首字符转换为大写,ucwords大写
uppercase letter
php ucwords() 函数将字符串中每个单词的首字符转换为大写,ucwords大写
php ucwords() 函数将字符串中每个单词的首字符转换为大写, 本文章向码农介绍php ucwords() 函数的基本使用方法和实例,感兴趣的码农可以参考一下。
定义和用法
ucwords() 函数把字符串中每个单词的首字符转换为大写。
注释:该函数是二进制安全的。
相关函数:
- lcfirst() - 把字符串中的首字符转换为小写
- strtolower() - 把字符串转换为小写
- strtoupper() - 把字符串转换为大写
- ucfirst() - 把字符串中的首字符转换为大写
语法
<code class="language-php hljs">ucwords(string)</code>
Copy after login
参数 | 描述 |
---|---|
string | 必需。规定要转换的字符串。 |
技术细节
返回值: | 返回已转换的字符串。 |
PHP 版本: | 4+ |
实例
把每个单词的首字符转换为大写:
<?php echo ucwords("hello world"); ?>
Copy after login
在线运行
原文地址:http://www.manongjc.com/article/804.html
相关阅读:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
1 months ago
By DDD
R.E.P.O. Save File Location: Where Is It & How to Protect It?
1 months ago
By DDD
R.E.P.O. Best Graphic Settings
2 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Assassin's Creed Shadows: Seashell Riddle Solution
1 weeks ago
By DDD

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)
