Jump to content

ECHO html markup, or add it up then echo it as one big string (for big tables)


5kyy8lu3

Recommended Posts

I notice alot of people just add to one string all the html markup for a table in their loop, then they just echo that variable to make the table, is this a better way than how I do it?

 

for example, what i do:

 

for (blah, blah blah)
{
	echo '<td>', $somearray, '</td>';
}

 

vs how i see alot of other people do:

 

for (blah, blah, blah)
{
	$html_out .= '<td>' . $somearray . '</td>';
}

echo $html_out;

 

i ask this because my visitor log is pretty indepth and accesses a few tables for IP to country, last visit, browser info, etc and several functions i made, and it's gettin close to 200 rows in the html table now and the page seems like it's loading slower, though it might just be a bad week for my webhost, any input would rock, thanks

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.