Follow
Follow

How to convert a string to lowercase in PHP

strtolower() function

The strtolower() function is used to converts a string to lowercase. All other special characters or numeric characters in the string remains unchanged. This function is binary-safe.

Syntax:

strtolower(string)

string – This parameter is required. It specifies the string to convert.

Example:

<?php
$str = 'Welcome to PHP Tutorials!';
echo strtolower($str);   // Output : welcome to php tutorials!
?>
Newsletter
Join Design Community
Get the latest updates, creative tips, and exclusive resources straight to your inbox. Let’s explore the future of design and innovation together.