English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The ctype_lower() function checks if all characters in the string are lowercase letters.
ctype_lower ( $text );
This function checks if all characters in the provided string are lowercase letters.
Number | Parameters and Description |
---|---|
1 | text(Required) The string to be tested. |
Returns TRUE if each character in the text is a lowercase letter in the current locale.
Check if all characters are lowercase letters.
<?php $strings = array('aac123', 'testing', "testin IS Done"); foreach ($strings as $test) { if (ctype_lower($test)) { echo "$test All lowercase letters. \n"; }else { echo "$test Contains characters that are not lowercase letters or characters. \n"; } } ?>Test and see‹/›
Output Result:
aac123 Contains characters that are not lowercase letters or characters. testing All lowercase letters. testin IS Done contains characters that are not lowercase letters or characters.