Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $email = 'name@example.com';
- $domain = strstr($email, '@');
- echo $domain; // result: @example.com
- echo "</br>";
- $user = strstr($email, '@', true); // As of PHP 5.3.0
- echo $user; // result: name
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement