Re: For/Next Help Needed
| From: | John W. Holmes | Date: | Mon, 05 Jul 2004 03:33:10 +0000 |
| Subject: | Re: For/Next Help Needed | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189683@lists.php.net to get a copy of this message | ||
Nothing, really. Using a foreach() simply means you don't have to keep up with the $z count variable... foreach($recipient as $email) { mail($email,$subject,$message,$headers); } -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals – www.phparch.comfor($z=0;$z<count($recipient);$z++) { mail($recipient[$z],$subject,$message,$headers); }What is the difference between this code and using a "foreach" command?