Page is a not externally linkable
KenB - 4:14 am on Feb 12, 2010 (gmt 0)
I'm only mirroring Apache, PHP & MySQL versions, The server is FreeBSD and my laptop is WinXP. It isn't a perfect mirror but it is the best I can do. It did help be uncover all kinds of inefficient ways I was doing things like putting a trim() or count() in the wrong place causing them to be called repetitively, whereas by moving them I could get them to be called once. For example:
BAD
while ($i < count($menu)){i++;}
GOOD
$MenuCount=count($menu);
while ($i < $MenuCount){i++;}
Apparently with the first version the count has to be recalculated on every loop. Setting the count to a variable and then referencing the variable in the while statement allowed the count to be done only once. It makes sense when you stop and think about it, but it hadn't occurred to me.