Re: How to print out an array in mail!
| From: | Stefan \ " Zipkid \ " Goethals | Date: | Mon, 16 Oct 2000 09:28:15 +0000 |
| Subject: | Re: How to print out an array in mail! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20320@lists.php.net to get a copy of this message | ||
David Tandberg-Johansen wrote:
>
> Hello !
>
> I wonder if any one could give me some hints on how to write out an array in
> an mail body.
>
> I have tried to put the while loop in the body of the mail but when the
> recipient recived the mail it show only the code of the while loop.
>
function MailMyMessage( $To, $array ){
$messagebody = "";
foreach( $array as $key => $value ){
$messagebody = $messagebody . $key . " : " . $value . "\n";
}
mail( $To, "subject", $messagebody );
}
Bye
--
Stefan - Zipkid - Goethals
YourNet - Open source web design & Site management.
http://www.yournet.be
mailto:stefan@yournet.be