strtolower

string strtolower(string string) 

Converts a string to lowercase.

Returns:

Lowercase string

Description:

strtolower() converts all uppercase alphabetical characters within a string to their lowercase equivalents.

Note:

The conversion from uppercase to lowercase is dependent upon the current locale. Use setlocale() to set or query the locale.

Version:

PHP 3+, PHP 4+

See also:

To alter the case of a string:

strtoupper() 
ucfirst() 
ucwords() 

Example:

Convert a block of text to lowercase
 <?php $poem = <<<_SAIL_ On A Nutty Zephyr Of Gruyere Ease I Sail The Trackless Seas Of Cheese For Pirates' Gold I Do Not Lust Just Parmesan That's Unlike Sawdust _SAIL_; // Remember, kids, nothing says poetry like lowercase ;) echo strtolower ($poem); ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.