Php converts the initial character string to uppercase, and the string to uppercase. Php converts the first character of a string to uppercase. This document describes how php converts the first character of a string to uppercase. Share it with you for your reference. Php converts the initial character of a string to uppercase, and converts the string to uppercase.
This article describes how php converts the initial character of a string to uppercase. Share it with you for your reference. The specific analysis is as follows:
In php, you can use the ucfirst function to convert the first letter in a string to uppercase, while the ucwords function can convert the first letter of each word in a string to uppercase.
<? Php $ string = "php string functions are easy to use. "; $ sentence = ucfirst ($ string); $ title = ucwords ($ string); print (" $ sentence \ n "); print (" $ title \ n "); print ("\ n");?>
The output result is as follows:
Php string functions are easy to use. Php String Functions Are Easy To Use
I hope this article will help you with php programming.
Examples in this article describes how php converts the initial character of a string to uppercase. Share it with you for your reference. Details...