How can I write this in PHP?
if ($text contains at least one letter from A to Z, regardless of numbers or other characters)
echo 'Yes';
else
echo 'No';
Please help.
Here's something that will help
preg_match("/[a-z]/i",$text);
Like this
if (preg_match('/[A-Za-z]/i', $variable)) {
echo 'Yes';
}
else {
echo 'No';
}
Use preg_match() function
if (preg_match('/[a-z]/i', $text))
echo "Matches";
else
echo "No matches";