=1 and strpos($email,'@') !== false){ echo 1; // email tidak tersedia } else if(strpos($email,'@') == false ){ echo 2; // bukan format email } else if(strpos($email,'@') !== false ){ echo 0; // email tersedia } ?>