Re: Whats more efficient? ( echo " "; or <?php echo ?> )
| From: | Rolf Brusletto | Date: | Wed, 22 Oct 2003 04:32:32 +0000 |
| Subject: | Re: Whats more efficient? ( echo " "; or <?php echo ?> ) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-167054@lists.php.net to get a copy of this message | ||
I'll just on the template bandwagon, I use smarty. (http://smarty.php.net)
Rolf Brusletto
phpExamples.net
John W. Holmes wrote:
Ryan A wrote:I have an option box on a webpage and have around 10 options on it and have run into a doubt, which is more efficient to do: 1. <option value="1"<?php if($th_order==1){echo " SELECTED"; } ?>>Something1</option> <option value="2"<?php if($th_order==2){echo " SELECTED"; } ?>>Something2</option> (or) 2. instead of having the <?php and ?> mixed in the HTML is it better to echo/print the whole lines?Use a template engine to separate your presentation from your logic. :)