Page 1 of 1

efficiency question

Posted: Sun Jan 19, 2003 4:33 am
by Guy
hi
when writing a php page that generates html , some times a lot of html,
I was wondering what is more efficient:
to print the whole html at once or by parts.
for example: if I have a big table, should I append to it the trs and tds
and then print it , or print each tr alone.
there might be a question of timing out when appending and sending big string.
also , what is more efficient from experience, print or echo ?
thanks
Guy

Posted: Sun Jan 19, 2003 8:46 am
by laserlight
I think for the first part, it really depends on your code.

As for echo and print, generally there isnt much difference, though echo could be marginally faster as it is purely a language construct, unlike print which can act as a function.

Posted: Sun Jan 19, 2003 8:46 am
by Kriek
A little off topic, but still on efficiency.
Read Inline Over Echo.