ballouta Posted August 17, 2008 Share Posted August 17, 2008 Hello i have this string value $string = "TO:<[email protected]>: host mx2.hotmail.com [65.54.245.40]: 550 Requested action not taken: mailbox unavailable [email protected] SMTP error from remote mail server after RCPT TO:<[email protected]>: host mx2.hotmail.com [65.54.245.40]: 550 Requested action not taken: mailbox unavailable [email protected] SMTP error from remote mail server after RCPT TO:<[email protected]>: host mx2.hotmail.com [65.54.245.40]: 550 Requested action not "; And I have this preg_match (which works correctly) $str = preg_match('#\b.+(@|(\[at\])).+\b#', $message, $match); How i can loop and print all resluts? Thanks Link to comment https://forums.phpfreaks.com/topic/120081-solved-need-loop/ Share on other sites More sharing options...
nrg_alpha Posted August 17, 2008 Share Posted August 17, 2008 Since you are storing all matches into an array called $match, you should be able to use: foreach($match as $val){ echo $val . '<br />'; } Link to comment https://forums.phpfreaks.com/topic/120081-solved-need-loop/#findComment-618643 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.