Jump to content

Would this while statement work?


Bman900

Recommended Posts

I was wondering if this is correct or there is a better way of doing this?

 

<?php
$result = mysql_query("SELECT * FROM newsletter");


while($row = mysql_fetch_assoc( $result ))
{
    

$email = $row; 

mail($email, $subject, $message,"From: $from_email\n" . "MIME-Version: 1.0\n" . "Content-type: text/html; charset=iso-8859-1"); 

echo "$email was sent!";

} 

?>

 

Link to comment
https://forums.phpfreaks.com/topic/198310-would-this-while-statement-work/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.