What is strtolower() in PHP?

The strtolower() function in PHP converts a string to lowercase.

The following figure shows a visual representation of the strtolower() function.

Visual representation of the strtolower() function

Syntax

string strtolower(string)

Parameter

As a parameter, the strtolower() function requires a string that is to be converted to lowercase.

Return value

The strtolower() function returns a string that is converted to lowercase.

Code

The code below shows how the strtolower() function works in PHP.

<?php
#string
echo("strtolower('EDUCATIVE'): ");
echo (strtolower('EDUCATIVE'));
echo("\n");
#string with number
echo("strtolower('EDUCATIVE09'): ");
echo (strtolower('EDUCATIVE09'));
?>

Free Resources