How to loop?

From: Date: Mon, 11 Aug 2003 22:07:47 +0000
Subject: How to loop?
Groups: php.general 
Request: Send a blank email to php-general+get-159202@lists.php.net to get a copy of this message
I understand the principle of mail. What I want to do is use a <textarea> as a mailing list, something like this. How do I loop it? <?php if (!$message) { ?> <form> <textarea name=addresses>123@hotmail.com 456@hotmail.com 123@hotmail.com</textarea> <textarea name=message>hi everyone, how are you?</textarea> <input type=submit> </form> <?php }else{ for i = 1 to end of $addresses { mail($addresses[i], "My Subject", $message); } { #http://www.php.net/manual/en/function.mail.php ?> John

« previous php.general (#159202) next »