3
Contributors
3
Replies
7
Views
6 Years
Discussion Span
Last Post by dalip_007
1

This code return array of emails.

<?
	$str = '"ceo@facekut.com" <ceo@facekut.com>,"Rahul Mahajan" <creative.rahul007@gmail.com>';
	$pattern = '/<([^"]*)>/';
	preg_match_all($pattern, $str, $matches, PREG_OFFSET_CAPTURE, 3);	
	foreach($matches[1] as $val)
	{
		foreach($val as $key=>$each)
		{
			if($key==0)
				$email[]=$each;
		}
	}
	print_r($email);
	
	
?>
Votes + Comments
Vibha is exceptionally excellent.
0

Hi
Thanks for your kind help, It worked superb for me, and my problem which was continue from long time is solved now.


Thanks again.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.