Forum Moderators: coopster
<?php
if(var=result){
print theresults
}
else{
print alternateresults
}
print <br />
print some text
if(var=result2){
print theresults2
}
print <br />
print some text
?>
or
<?php if(var=result){?>
theresults
<?php } else {?>
alternateresults
<? }?>
<br />
some text
<?php if(var=result2){?>
theresults2
<? }?>
<br />
some text
In other word, will the page load faster or the server load be smaller, in ex 1 because it will parse the php all in one go. I think that's the way to write ASP to ease the load on the asp engine.
Thanks
Leo
For your specific question, I think the first option was significantly faster.
;)
we try to get the best threads in the library [webmasterworld.com] ;)