I am confused by how to make ob_start and Controller:render work
together.

For example, in my controller User, I have one function:

addOneRecord($oneUser)
{
...
 if ($this->User->save($this->data['User']))
                          $this->render('userSummary');
...
}

userSummary is a HTML table

Within the same controller, I have another function:

addManyRecords()
{
...
ob_start();
foreach ($manyUsers as $oneUser)
            $this->addOneRecord($oneUser)
ob_end_flush();
...
}

I expect to see something like
<html><body>
<table></table>
<table></table>
...
<table></table>
</body></html>

However, I get

<html><body>
<table></table>
</body></html>

<html><body>
<table></table>
</body></html>

...

<html><body>
<table></table>
</body></html>

Where did I make mistake? What shall I do? Any help?

Thank you


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to