Concerning the email filter : PHP has validation filters.
You can find more informations here : http://www.php.net/manual/en/filter.filters.validate.php
In your case, you want to use the FILTER_VALIDATE_EMAIL :
if(filter_var($email, FILTER_VALIDATE_EMAIL))
{ ... }
Concerning the part with the two ords, use the function explode.
Syntax of the explode function :
array explode ( string $delimiter , string $string)
In your case :
$array = explode(' ', $string);