Home >Backend Development >PHP Tutorial >How to use php strtolower function

How to use php strtolower function

藏色散人
藏色散人Original
2019-01-30 10:45:414123browse

php The strtolower function is used to convert strings to lowercase. The syntax of strtolower is strtolower(string). The parameter string is required and specifies the string to be converted.

How to use php strtolower function

php How to use strtolower function?

Function: Convert all characters to lowercase

Syntax:

strtolower(string)

Parameters:

string Required, specifies the string to be converted

Description: The strtolower() function converts a string to lowercase. This function is binary safe.

php strtolower() function usage example 1:

<?php
$i = "HELLO WORLD";
$j = strtolower($i);
echo $j;
?>

Output:

hello world

php strtolower() function usage example 2:

<?php
$i = "I&#39;M STUDY IN PHP.CN";
$j = strtolower($i);
echo $j;
?>

Output:

i&#39;m study in php.cn

This article is an introduction to the PHP strtolower function. I hope it will be helpful to friends in need!

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