strtolower – PHP String Functions

Syntax :

strtolower ( string );

Description :

strtolower() function will take string as input and converts all letter to lowercase letter, if that character is alphabetic.


Parameter :

  • string – This is a Required parameter. This is a string on which function will be performed.
Note : This function is binary-safe.

Output :

This will return a lowercased string.


Related articles : ucwords()strtoupper()ucfirst(), lcfirst().


strtolower() – PHP Functions Example 1 :
<?php
$strExample = "An EXAMPLE of a strtolower() function.";
echo strtolower($strExample);
?>

In above example ,We have a string ‘An EXAMPLE of a strtolower() function’. Now this function will converts every letter in a string to lowercase. See below is the output of above code.

an example of a strtolower() function.

strtolower() – PHP Functions Example 2 :
<?php
$strExample = "AN Example Of A strtolower() function WITH 789789.";
echo strtolower($strExample);
?>

In above example ,We have a string ‘AN Example Of A strtolower() function WITH 789789.’. Now this function will converts every first letter in a string to lowercase, it will not do anything with numeric numbers. See below is the output of above code.

1. an example of a strtolower() function with 789789.

Find more PHP String Functions with examples PDF only at Tutorialmines now!


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *