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 Quote 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 />'; } Quote Link to comment https://forums.phpfreaks.com/topic/120081-solved-need-loop/#findComment-618643 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.