Jump to content

Archived

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

djones

Email MySQL array results

Recommended Posts

How can I email the results of a MySQL array (loop). For example:

[code]
while ($myrow = mysql_fetch_array($result)){

$field = $myrow["field"]; // Will return multiple rows

}
[/code]

Now I need to mail the results above only once. I know how to use the mail function.

Share this post


Link to post
Share on other sites
You could do something like this.

[code=php:0]
$field = "begin list<br />";
while ($myrow = mysql_fetch_array($result)){
   $field .= $myrow['field'] . '<br />';.
}

$to = "someone";
$subject = "something";
$message = 'The is a list of someting: ' . $field;
//now send the message
[/code]

Hope that helps,
Tom

Share this post


Link to post
Share on other sites

×

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.