PHP Find out the first occurrence of a string – PHP May 2, 2011 Pramod T P Leave a comment <?php $email = 'firstname@mail.com'; $domain = strstr($email, '@'); echo $domain; // prints@mail.com ?>