Facebook Page Twitter Page LinkedIn Page
× PHP Tutorial PHP Advanced PHP Resources


The PHP String strtolower() function returns the string with all characters of the specified string in lowercase. Any symbol, space, special character or number in the string is ignored while applying this function. Only Alphabets are converted.

Syntax

strtolower(string)

Parameters

string Required. Specify the string to convert

Return Value

Returns the lowercased version of the specified string.

Example:

In the below example, strtolower() function returns a string containing all characters of the specified string MyString in lowercase.

<?php
$MyString = "HeLLo John!";
$NewString = strtolower($MyString);

echo $NewString."\n";
?>

The output of the above code will be:

hello john!

❮ PHP String functions

5