Hi
Say you needed to write alot of dynamic HTML, what would you think is faster (using php5)
1.
//In base class:
function write($append)
{
$this->out .= $append;
}
funciton flush()
{
echo $this->out;
unset ($this->out);
}
//Where the action is
//call write function as much as you need, ex
$this->write('<div>.....');
...
//and finally do
$this->flush();
2.
Or just call echo('<div>....'); whenever you need to out put.
So basically this question is: which is faster echoing or appending to string?
Thanks