Hi Venus...
$domain = explode("@",$mail);
if (in_array($domain[1],$bad_mailers)) {echo "bad mail";}
else { echo "good mail"; }
when we "explode" the $mail var, it separates $mail at the "@" sign. in each email address, there is only 1 "@". So, we only have 2 vars in our exploded array:
if $testmail = heyrad@hotmail.com...
$domain = explode("@",$testmail);
$domain[0] = heyrad -- the left side of "@"
$domain[1] = hotmail.com -- the right side of "@"
Remember... arrays are indexed starting at 0 🙂
So, we check the 2nd var in the array($domain[1]) to see if it matches... Hope this helped..
-heyrad