John W. Holmes wrote:
> 
> mcp6453 wrote:
> 
> > I'm using Jack's PHP FormMail script, and I need to change it. I know
> > very little abou PHP, but here's what I very much need to do right away.
> >
> > I need the script to send the same hard coded message to each of 10
> > people. All of the email addresses do not need to be in the "To" field.
> > Only the intended recipient needs to be there.
> >
> > So, I see the code as something line this:
> >
> > $recipient[1] = "[EMAIL PROTECTED]";
> > $recipient[2] = "[EMAIL PROTECTED]";
> > ...
> > $recipient[n] = "[EMAIL PROTECTED]";
> >
> > Then, something like this:
> >
> > for ($z=0;$z<count($val);$z++)
> >       mail($recipient[z$], $subject, $message, $headers);
> 
> for($z=0;$z<count($recipient);$z++)
> { mail($recipient[$z],$subject,$message,$headers); }


Thanks, John. That's helpful. I'm not sure what other problems I'm going
to run into. It looks like I may have to put the whole script inside the
"for" loop.

What is the difference between this code and using a "foreach" command?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to