Convert characters to lowercase using strtolower() function in PHP

In PHP, the strtolower() function converts all uppercase characters in a string to lowercase. This function is useful for strings that are meant to be case-insensitive, such as email addresses.

   echo strtolower("WORLD IS BEAUTIFUL");


world is beautiful

In the above code example, we have converted all the characters of String "WORLD IS BEAUTIFUL" to lowercase. The PHP function strtolower() will convert all the charters of the string to lowercase. It takes the string as a parameter and returns the same string in the lowercase format.


More Examples

Below are the code examples that can help you to better understand the functionality of strtolower() function.

  echo strtolower("We are ProgRammers");
  // -> we are programmers
  echo strtolower("make the WORLD a Beautiful Place");
  // -> make the world a beautiful place
  echo strtolower("Hello world");
  // -> hello world
Was this helpful?