php str_to lower code example

Example 1: how to convert string word to 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'
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 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.
?>

Tags:

Php Example