$domain = preg_replace($data['blacklist_email'],'^.*@');
<?php
$email = 'name@example.com';
$domain = strstr($email, '@');
echo $domain; // result: @example.com
$user = strstr($email, '@', true); // since PHP 5.3.0
echo $user; // result: name
?>
$exp_domain = explode('@', $data['blacklist_email']);
$domain = $exp_domain[1];
$exp_domain = explode('@', $data['blacklist_email']);
$domain = (isset($exp_domain[1]) ? $exp_domain[1] : "");
Category Forum
General DiscussionLabels
None yet
Statistics
4 participants
Notifications
You are not receiving notifications from this thread.
Related Questions