Given a string, check if all characters of it are in lowercase.
Input : gfg123 Output : No Explanation : There are characters '1', '2' and '3' that are not lower- case Input : geeksforgeeks Output : Yes Explanation : The string "geeksforgeeks" consists of all lowercase letters.
The above problem can be solved using the in-built functions in PHP. We store multiple values in an array and check using the in-built function in php to chech whether all the characters are lowercase.
We solve the given problem using the in-built functions in PHP and iterate from a given array of strings.We use the following in-built function in PHP:
- ctype_lower : Returns true if all of the characters in the provided string, text, are lowercase letters. Otherwise returns false.
No Yes No
- How to check a string begins with some given characters/pattern ?
- How to use a switch case 'or' in PHP?
- PHP | Different characters in the given string
- How to get the last n characters of a PHP string?
- How to remove non-alphanumeric characters in PHP?
- How to remove all non-printable characters in a string in PHP?
- Which characters are valid in CSS class names/selectors?
- PHP | check if a number is Even or Odd
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.