strtolower – PHP String Functions
Syntax :
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.
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.
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.
Find more PHP String Functions with examples PDF only at Tutorialmines now!