The function strtolower() that converts php strings to lowercase

黄舟
Release: 2023-03-17 07:02:01
Original
2169 people have browsed it

Example

Convert all characters to lowercase:

<?php
echo strtolower("Hello WORLD.");
?>
Copy after login

Definition and usage

strtolower() function converts a string to lowercase.

Note: This function is binary safe.

Related functions:

  • strtoupper() - Convert the string to uppercase

  • lcfirst() - Convert the string to uppercase Convert the first character in the string to lowercase

  • ucfirst() - Convert the first character in the string to uppercase

  • ucwords() - Convert the first character in the string to uppercase Convert the first character of each word in the string to uppercase

Syntax

strtolower(string)
Copy after login
ParametersDescription
stringRequired. Specifies the string to be converted.

Technical details

Return value: Returns the string converted to lowercase.
PHP version: 4+
##strtolower function: This function will pass in the string parameter All characters are converted to lowercase and put back into the string in their minor form.

Example:

<?php
    $str = "I want To FLY";
    $str = strtolower($str);
    echo $str;
//by www.jbxue.com
?>
Copy after login

Output:


i want to fly
Copy after login


The above is the detailed content of The function strtolower() that converts php strings to lowercase. 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