I'm trying to optimize the performance of my pages, by splitting the sql queries and the php/html output.
That is very useful in the case of a loop, like :
QUERY;
while ($tbl=RESULT) {
$VARS=$tbl["stuff"];
echo $VARS;
}
Becoming :
QUERY;
while ($tbl=RESULT) {
$i++;
$VARS=$tbl["stuff"];
$echo[$i]="$VARS";
}
$ii=count($echo);
for ($i=1; $i<=$ii; $i++){
echo "$echo[$i]";
}
This is much faster, since you just connect for a small laps of time.
But in the case of two or more while(), like this :
while(){
while(){