What is the case conversion function in php

王林
Release: 2023-02-28 19:42:01
Original
2509 people have browsed it

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;
?>
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template