RE: [PHP] -loop question-

From: Date: Mon, 04 Mar 2002 14:02:50 +0000
Subject: RE: [PHP] -loop question-
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-87086@lists.php.net to get a copy of this message
I'm assuming you want to send a list of passengers as the body of the text. Surely you want to do something like: $body = ''; for ($i = 0; $i < $passengerNumberl ++$i) { $body .= $Name_Passenger_[$i].'\n'; } mail ($to, $subj, $body, $header); IE Prepare the list of passengers first, and then use that string as the message body??? HTH, Richy ========================================== Richard Black Systems Programmer, DataVisibility Ltd - http://www.datavisibility.com Tel: 0141 435 3504 Email: rblack@datavisibility.co.uk -----Original Message----- From: Richard Bradley [mailto:richard@yourlink.net] Sent: 04 March 2002 13:54 To: php-general@lists.php.net Subject: [PHP] -loop question- I want to run a loop inside of the "body" section of the mail() function. // ********CODE SNIPPLET************ // mail ($to, $subj, for ($i = 0; $i < $passengerNumber; ++$i) { $Name_Passenger_[$i] " } , $header); // *******END CODE SNIPPLET *********// I can't seem to run the loop inside a variable either. Any suggestions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#87086) next »