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 ?> Share this: Click to share on X (Opens in new window) X Click to share on Facebook (Opens in new window) Facebook Like Loading...