|
Posted by windandwaves on 10/28/70 11:31
R. Rajesh Jeba Anbiah wrote:
> windandwaves wrote:
>> Hi Folk
>>
>> My question is:
>> echo all the time vs echo at the end - what is faster
> <snip>
>
> As everyone stated, comparing the two, (1) is faster. But, none of
> them are faster as compared to embedded HTML/PHP.
> <quote src="http://in2.php.net/language.basic-syntax#AEN2666">
> for outputting large blocks of text, dropping out of PHP parsing mode
> is generally more efficient than sending all of the text through
> echo() or print().
> </quote>
Agree. While speed is important to me, efficient code is probably even more
important to me.
I now use the "ob_start and flush" method to clean up all my html (it
becomes one line without any tabs, double spaces) for speed, while keeping
the code nicely embedded in php (much easier to put in variables without the
labourious <?php echo $my_variable; ?> every time you want to do so).
Thanks
- Nicolaas
Navigation:
[Reply to this message]
|