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

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

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