Tutorials Point


  Learning PHP
  Advanced PHP
  PHP Function Reference
  PHP Useful Resources
  Selected Reading

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

PHP Function ctype_lower()


previous

Advertisements

Syntax

ctype_lower ( $text );

Definition and Usage

Thsi function checkes if all of the characters in the provided string, text, are lowercase letters.

Paramters

ParameterDescription
textRequired. The tested string.

Return Value

Returns TRUE if every character in text is a lowercase letter in the current locale.

Example

Try out following example:

<?php
$strings = array('aac123', 'testing', "testin IS Done");
foreach ($strings as $testcase) {
 if (ctype_lower($testcase)) {
     echo "$testcase consists of all lowercase letters.<br />";
 } else {
     echo "$testcase does not have all lowercase letters.<br />";
 }
}
?> 

This will produce following result:

aac123 does not have all lowercase letters.
testing consists of all lowercase letters.
testin IS Done does not have all lowercase letters.

previous Printer Friendly

Advertisements


  

Advertisements