Quote:
Originally Posted by quantum-x
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":''?>