Among the PHP string processing functions, the simplest functions will not be explained, and the examples will be directly looked at. Among the PHP string processing functions, the simplest functions will not be explained, and the examples will be directly looked at. strtolower function, strtoupper function, ucfirst function, ucwords function
<?php $str = "it is cool to be you"; echo strtoupper($str).""; // Convert all strings to uppercase echo strtolower($str)."" // Convert all strings to lowercase echo ucfirst($str).""; // Convert the first letter of the string to uppercase echo ucwords($str).""; // Convert the first letter of each word in the string to uppercase ?>
Of course, no matter how simple the code is, even if the code is understandable, it may not be able to type. It is recommended to type by hand. If you are a copy party, there is no need to learn a programming language, because you cannot understand the essence of the programming language.