Home  >  Article  >  Backend Development  >  What is the case conversion function in php

What is the case conversion function in php

王林
王林Original
2020-04-25 13:42:512490browse

What is the case conversion function in php

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn