1. Convert the string to lowercase
strtolower(): This function converts all the characters of the incoming string parameter into lowercase and writes them in lowercase The form returns a string.
Example:
<?php $str = "I want To FLY"; $str = strtolower($str); echo $str; ?>
2. Convert characters to uppercase
strtoupper(): The function of this function is opposite to the strtolower function. It converts the characters of the incoming character parameters Converts all to uppercase and returns the string in uppercase. The usage is the same as strtolowe().
For more related tutorials, please pay attention to php Chinese website.
The above is the detailed content of What is the case conversion function in php. For more information, please follow other related articles on the PHP Chinese website!