php convert to lowercase code example

Example 1: strtolower php

strtolower ( string $string ) : string 
//Returns string with all alphabetic characters converted to lowercase.
$string = 'HELLO WORLD';
echo strtolower($string); //Output: 'hello world'
$string = 'HeLlO WoRlD';
echo strtolower($string); //Output: 'hello world'

Example 2: how tdo you convert a stringto lowercase in php

strtolower ( string $string ) : string 
//Returns string with all alphabetic characters converted to lowercase.
$string = 'HELLO WORLD';
echo strtolower($string); //Output: 'hello world'

Example 3: convert string to lowercase in php

/* The strtolower() function converts a string to lowercase.
Convert all characters to lowercase.*/

// Output: hello world.

Example 4: tolower php

The strtolower() function is used to convert a string into lowercase. This function takes a string as parameter and converts all the uppercase english alphabets present in the string to lowercase.

Example 5: convert string to lowercase in php

/* There is a function in php wich convert all paragraph or 
string to lowercase*/

Tags:

Misc Example