I need to check if the email id provided by the user ends with aa.bb.cc
For example if the user provides an email id name@collegename.aa.bb.cc
i want the check to only be placed on aa.bb.cc
collegename can be whatever it does not matter but the id must end with aa.bb.cc
So to achieve it I tried
$value = 'name@collegename.aa.bb.cc';
$explodedEmail = explode('@', $value);
$domain = array_pop($explodedEmail);
This gives me an output of
collegename.aa.bb.cc
So how can I place a check where the collegename
is ignored and i have just aa.bb.cc