Which function is used by php to convert letters to uppercase?
This article mainly explains the "php to capitalize the function is which", the content of the explanation is simple and clear, easy to learn and understand, the following please follow the editor's train of thought slowly in depth, together to study and learn "which is the function of php to capitalize?"
Php to achieve letter to uppercase there are three functions, namely: 1, strtoupper function, used to convert the string to uppercase; 2, ucfirst function, used to convert the first character in the string to uppercase; 3, ucwords function, used to convert the first character of each word in the string to uppercase.
This article operating environment: windows7 system, PHP7.1 version, DELL G3 computer
What is the function of php to convert letters to uppercase?
The strtoupper () function converts a string to uppercase.
Note: this function is binary safe.
Related functions:
Lcfirst ()-converts the first character in a string to lowercase
Strtolower ()-converts a string to lowercase
Ucfirst ()-converts the first character in a string to uppercase
Ucwords ()-converts the first character of each word in the string to uppercase
Grammar
Strtoupper (string)
Parameters.
String is required. Specifies the string to be converted.
Example
Convert all characters to uppercase:
Running result:
HELLO WORLD. Thank you for your reading, the above is the "php to capitalize which is the function" of the content, after the study of this article, I believe that php to achieve capitalization of the function is which this problem has a more profound understanding, the specific use of the need for everyone to practice and verify. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!