Perfect solution. Thanks!!!
----- Original Message ----- From: "Dan Anderson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, July 05, 2003 4:30 am Subject: Re: [PHP] mail() > > > Could someone let me know if it is possible to pass a resultset of a query > > > to a single variable so it can be included as the message part of the mail > > > function? > > if I were you I would try something like... > > <?php > > $result = mysql_query($query); > $email = NULL; // it's bad form to dot without clearing the variable > while ($line = mysql_fetch_array($result,MYSQL_ASSOC)) > { > $email = $email . "Value 1: {$line['value_1']}\n"; > $email = $email . "Value 2: {$line['value_2']}\n"; > $email = $email . "Value 3: {$line['value_3']}\n"; > // ... > } > mail('[EMAIL PROTECTED]','subject',$email); > ?> > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php