Why am I so bad at this?
$emailto = "hello bye";
if(ereg("[!,] .",$emailto))
{
echo "<b>$emailto</b> is a bad format";
}
else
{
echo "<b>$emailto</b> is a good format";
}
It keeps saying this is a good format. I need it to be bad. I am trying to make it so that if there is a space without a comma before it, it will say it is bad. This is for e-mail so
"whoever@hotmail.com another@hotmail.com" is bad because there is no comma right after whoever@hotmail.com