> I was wondering if there is a way to check for spaces inside an email address?
There are several ways of validating an email address (from a syntactical standpoint).
I've used something like this in the past, and it works pretty well.
return ereg("^[^@ ]+@[^@ ]+\.[^@ ]+$", $email);
If you just want to check for the presence of space, do something like the following:
if (strstr(trim($email), ' '))
// The email contains single space characters
// The email does not contain space characters
(This doesn't find tabs BTW)
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design