Home >Backend Development >PHP Problem >How to use php strtolower function?

How to use php strtolower function?

藏色散人
藏色散人Original
2019-05-29 16:03:592989browse

php The strtolower function is used to convert a string to lowercase. Its syntax is strtolower(string). The parameter string is required and refers to the string to be converted.

How to use php strtolower function?

#php How to use strtolower function?

Definition and usage

strtolower() function converts a string to lowercase.

Note: This function is binary safe.

Related functions:

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

strtoupper() - Convert the string to Capitalize

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

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

Syntax:

strtolower(string)

Parameters:

string Required. Specifies the string to be converted.​

Return value: ​

Returns the string converted to lowercase.

PHP Version: 4

Example

Convert all characters to lowercase:

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

Output:

hello world.

The above is the detailed content of How to use php strtolower function?. 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