Code Snippets Php

function checkEmail($address)
{
if(ereg( "^[^@ ]+@([a-zA-Z0-9\-]+\.)+([a-zA-Z0-9\-]{2}|net|com|gov|mil|org|edu|int)$",$address) )
return true;
else
return false;
}