PHP - How can I check if a string contains only lower case characters? -



PHP - How can I check if a string contains only lower case characters? -

how can check if string in php contains lower case characters?

i tried:

if (!preg_match('~[a-z]~', $_post['name'])) { $errors[] = 'caracteres inapropriados!'; }

thanks!

this should work you:

it return's true if characters lower case!

if(ctype_lower($_post['name'])) echo "all characters lower case!";

php

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

Is there a way to convert an HTML page styled with Bootstrap CSS into email-compatible html? -