php str lower code example

Example 1: convert string to lowercase in php

/* strtolower() function converts  string to lowercase. */
<?php
echo strtolower("Hello WORLD 123");
?>
// Output:hello world 123

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: 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 4: convert string to lowercase in php

/* There is a function in php wich convert all paragraph or 
string to lowercase*/
<?php
echo strtolower("Hey Samy, HAVE YOU CHECK THE LATEST MOVIE.");


// Output: hey samy, have you check the latest movie.
?>

Example 5: php convert to lowercase

<?php
echo strtolower("Convert THIS TEXT ALL TO LOWER CASE");
?>

Tags:

Php Example