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

WBOY
Release: 2016-07-12 08:52:50
Original
802 people have browsed it

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

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

Definition and usage

The

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

Note: This function is binary safe.

Related functions:

  • lcfirst() - Converts the first character in the string to lowercase
  • strtolower() - Convert a string to lowercase
  • strtoupper() - Convert a string to uppercase
  • ucfirst() - Converts the first character in the string to uppercase

Grammar ucwords(string)

参数 描述
string 必需。规定要转换的字符串。

Technical details

返回值: 返回已转换的字符串。
PHP 版本: 4

Example

Convert the first character of each word to uppercase:

The above php ucwords() function converts the first character of each word in the string to uppercase (implementation code) is all the content shared by the editor with you. I hope it can give you a reference, and I hope you will learn more Support Bangke Home.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1125871.htmlTechArticlephp ucwords() function converts the first character of each word in the string to uppercase (implementation code), ucwords The uppercase php ucwords() function converts the first character of each word in the string to uppercase,...
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