This question already has an answer here:
I would like to know how can I check if a variable contains numbers 0 to 9 and characters a to z, like that:
if($string contains numbers[0-9] and characters[a-z])
{
echo "true";
} else {echo "false";}
</div>