I believe I read someplace once that it is more efficient to have your php embedded in your HTML where required. Something to do with the amount of parsing that the engine has to do. However, to reiterate what Captain John W. Holmes said, using a templating engine does allow you to better manage the project especially in dealing with maintenance down the road. I personally prefer to let the business logic create XML and employ XSLT to do my Html rendering. It may not be the quickest or most memory efficient, but, in my humble opinion, it is one of the easiest to maintain.

Jordan S. Jones

Ryan A wrote:

Hi everyone,
Just a simple doubt and basically your opinion needed.

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?

Thanks,
-Ryan





--
I am nothing but a poor boy. Please Donate..
https://www.paypal.com/xclick/business=list%40racistnames.com&item_name=Jordan+S.+Jones&no_note=1&tax=0&currency_code=USD

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to