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?
Really just a matter of personal preference. If I have a mostly PHP page, I would use echo to print out chunks of HTML. If I have a mostly HTML page (or section of a page), I would use separate <?php ?> sections within it. I doubt you'd notice any performance difference between the two so use whichever is easier for you to code.
Larry
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php