The following is a summary of several character functions in php. The following is a summary of several character functions in PHP: 1) ucfirst converts the initial character to uppercase, for example, $ stringthisismywebdevelopmentblog; echoucfirst ($ string); Output: Th. Below is a summary of several character functions in PHP, summary:
1) ucfirst
Change the first letter to uppercase, for example
$ String = "this is my web development blog ";
Echo ucfirst ($ string );
// Output: This is my web development blog
2) lcfirst, which is used to reduce the first letter
$ String = "This is my Web Development Blog ";
Echo lcfirst ($ string );
// Output: this is my Web Development Blog
3) strtoupper: converts the entire string to uppercase.
$ String = "this is my web development blog ";
Echo strtoupper ($ string );
// Output: THIS IS MY WEB DEVELOPMENT BLOG
4) strtoplower to reduce the entire string and write it
$ String = "tHiS is mY WeB DevElOpMenT bLoG ";
Echo strtolower ($ string );
// Output: this is my web development blog
(5) ucwords (). The first letter of each word in a sentence can be capitalized, for example
$ String = "this is my web development blog ";
Echo ucwords ($ string );
// Output: This Is My Web Development Blog
Summary: 1) ucfirst converts the initial letter to uppercase, for example, $ string = this is my web development blog; echo ucfirst ($ string); // Output: Th...