View Single Post
Old 09-16-2007, 08:28 AM  
AcidMax
Confirmed User
 
Join Date: May 2002
Location: MI
Posts: 1,827
Quote:
Originally Posted by quantum-x View Post
Incidentally, it still is a rather nasty way of doing stuff - html and php together == no no.
You really should seperate code from formatting.
What he is doing is not really code so to speak, its just templating. It's not any different if he was using smarty or any other templating system to determine what to show. Separating model/controller from views is more or less keeping actual logic out of the view.

Anyhow another way that can be done in a shorter syntax is:
Code:
<?=($active == 'content')?'id="content":''?>
__________________
Latest MMA news. http://www.mmawrapup.com

Last edited by AcidMax; 09-16-2007 at 08:30 AM..
AcidMax is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote