to lower in php code example

Example 1: 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 2: 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 3: php convert to lowercase

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

Example 4: php to lowercase

<?php
$str = "Mary Had A Little Lamb and She LOVED It So";
$str = strtolower($str);
echo $str; 
// Result: mary had a little lamb and she loved it so

Tags:

Php Example