In this PHP tutorial, you shall learn how to convert a given string to lowercase using strtolower() function, with example programs.

PHP – Convert string to lowercase

To convert a string to lowercase in PHP, use strtolower() function. Call strtolower()and pass the given string as argument.


The syntax to convert the string str to lowercase using strtolower() function is


The function returns a string value with all the characters in the given string converted to lowercase.



1. Convert string to lowercase

In this example, we will take a string str that has some uppercase characters. We convert this string to lowercase and print it.

PHP Program

  $str = 'Hello World';
  $output = strtolower($str);
  echo $output;



In this PHP Tutorial, we learned how to convert a string to lowercase, using strtolower() function.