PHP strtolower() function with example

By IncludeHelp Last updated : December 27, 2023

PHP strtolower() function

The strtolower() function is a string function, it accepts the string and returns an lowercase string.

Syntax

The syntax of the strtolower() function:

strtolower(string);

Parameters

The parameters of the strtolower() function:

  • string: An input parameter.

Sample Input/Output

Input: "This is my COMPUter!"
Output: "this is my computer!"

Example of PHP strtolower() Function

<?PHP
$str = "This is my COMPUter!";

echo (strtolower($str));
?>

Output

The output of the above example is:

this is my computer!

To understand the above example, you should have the basic knowledge of the following PHP topics:

All PHP Programs

Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.