PHP Ereg() Function Searches String, Returning True If Pattern Is Found, And False Otherwise. – String Function

 
Its syntax is: int ereg(string pattern, string string, [array regs])The search is case sensitive in regard to alphabetical characters.
Use ereg() to search strings for .com domains:<?
        $email="a@a.com";
        $is_com = ereg("(\.)(com$)", $email);
        print $is_com;
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.