Thanks a lot! I was already doing something of the sort, but with a LOT
more $message .=

Thanks again,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina


-----Mensaje original-----
De: Jim Lucas [mailto:[EMAIL PROTECTED]] 
Enviado el: lunes, 20 de enero de 2003 14:41
Para: Cesar Aracena; [EMAIL PROTECTED]
Asunto: Re: [PHP] Loop inside a table

instead of doing that your should do this

$message = "

<HTML>
<HEAD>
<TITLE>title goes here</TITLE>
</HEAD>
<BODY>
";

for ($x = 0; $x < $num_rows; $x++)
{
$message .= "some stuff";
}

$message .= "</BODY>
</HTML>";

you were also missing your last double quote.

Jim

----- Original Message -----
From: "Cesar Aracena" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 20, 2003 9:37 AM
Subject: [PHP] Loop inside a table


Hi all,

I always make for loops inside tables so I usually don't have problems
with it, but this case is a little different. I'm making a mail program
for my client to receive a mail each time a customer places an order in
his site.

Inside the mail program, I declaring a value called $message where an
HTML form is being created dynamically, depending on the products
selected by the customer or visitor.

The problem is that PHP apparently won't let me do a for loop inside
this variable. I have something like this:

$message = "

<HTML>
<HEAD>
<TITLE>title goes here</TITLE>
</HEAD>
<BODY>
".
for ($x = 0; $x < $num_rows; $x++)
{
//several lines made dynamically
}
."
</BODY>
</HTML>;

and the error goes like: unexpected T_FOR in line xxx (where my for loop
is). I've never tried this in the past, so I assumed it had to be done
normally but I see I was mistaken. Anyone did this before? What's the
problem here?

Thanks in advance,

Cesar L. Aracena
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(0299) 156-356688
Neuquén (8300) Capital
Argentina




--
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



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to