change…. so I switched to just putting all my output into a variable, then outputting it in a pesudo-template at the end of the script.
I also read of a difference in using
“stuff $php_variable stuff”, which is slower than
“stuff ” . $php_variable . ” stuff”, so I changed that where
appropriate as well. Additionally, ‘stuff’ is also faster, but by a neglible amount.
Here’s the old code:
[code]
while ($myrow = mysql_fetch_array($result)) {
if (mysql_errno() != 0) {
echo “Error ” . mysql_errno() .”
“;
} else { // end if (mysql_errno() != 0)
?>
“;
} else { // end if (mysql_errno() != 0)
$out .= “
$out .= ”
“;
$out .= ”
“;
$out .= ”
“;
$out .= ”
“;
$out .= ”
“;
$out .= ”
“;
$out .= ”
“;
} // end else
} // end while ($myrow = mysql_fetch_array($result))
[/code]
This was for about 425 rows, I believe.
I had no idea it made THAT much of a difference… Guess I’ll be using that on everything now… If not switching over to SMARTY or some other true templating system.