Thanks for your reply... I just tried it with ob_start(); and I think I'm
almost on the right track. Just one small issue. Since the records are in a
while loop, the results are printed line by line as expected. However, I
need to print something obtained from the sql query just once then the rest
to loop.

//a.agentname displays only once and h.title/h.address will be in a list
SELECT h.title, h.address, a.agentname FROM homes h, agents a WHERE AND$aid

Basically what I'm after is displaying something like:

Agent: Fred
nice house, 123 street
ugly house, 643 road

Thanks again for your help on this.


> -----Original Message-----
> From: Miguel Cruz [mailto:[EMAIL PROTECTED]]
> Sent: April 17, 2002 8:28 PM
> To: Jason Dulberg
> Subject: Re: [PHP] save html created by loop in variable
> On Wed, 17 Apr 2002, Jason Dulberg wrote:
> > I have a WHILE loop that I am interested in storing the html that is
> > generated based on its results to a variable. This variable 
> would then be
> > echoed later on.
> Check in the manual under Output Buffering.
> miguel

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to