Using regular expressions
- by Tom
What is wrong with this regexp? I need it to make $name to be letter-number only. Now it doens't seem to work at all.
if (!preg_match("/^[A-Za-z0-9]$/",$name)) {
$e[]="name must contain only letters or numbers";
}