Can someone tell me if this is the correct way to go about it, or if
there's a better way?
Need to detect if a variable is a email address or not. The only time @
would ever occur in that variable is if its an email:
So, whats wrong with:
if (preg_match("/@/", "$to")) {
$email =1;
}
Thanks,
Ben
--
BWGames
to email change de.news to de-news
there's a better way?
Need to detect if a variable is a email address or not. The only time @
would ever occur in that variable is if its an email:
So, whats wrong with:
if (preg_match("/@/", "$to")) {
$email =1;
}
Thanks,
Ben
--
BWGames
to email change de.news to de-news
Comment