The php ucwords() function converts the first character of each word in the string to uppercase (implementation code)

高洛峰
Release: 2023-03-04 14:54:01
Original
1362 people have browsed it

php ucwords() function converts the first character of each word in the string to uppercase. This article introduces the basic usage and examples of the php ucwords() function to coders. Interested coders can refer to it.

Definition and usage

ucwords() function converts the first character of each word in the string to uppercase.

Note: This function is binary safe.

Related functions:

lcfirst() - Convert the first character in the string to lowercase

strtolower() - Convert the string to lowercase

strtoupper() - Convert the string to uppercase

ucfirst() - Convert the first character in the string to uppercase

Syntax ucwords(string)

php ucwords() 函数将字符串中每个单词的首字符转换为大写(实现代码)

Technical details

php ucwords() 函数将字符串中每个单词的首字符转换为大写(实现代码)

Example

Convert the first character of each word to uppercase:

< ?phpecho ucwords("hello world");?>

The above php ucwords() function converts the first character of each word in the string to uppercase (implementation code) is what I share with you The entire content is here, I hope it can give everyone a reference, and I also hope everyone will support the PHP Chinese website.

For more php ucwords() function, convert the first character of each word in the string to uppercase (implementation code), please pay attention to the PHP Chinese website for related articles!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!