Created
November 6, 2014 10:43
-
-
Save nixon1333/f1edd732cde370749d62 to your computer and use it in GitHub Desktop.
simple solution for extracting domain name in php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$email = 'nixon@png.com.au'; | |
//get the domain here | |
$domain = array_pop(explode('@', $email)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment