Re: Cleaning up my messy code

From: Date: Tue, 30 Sep 2003 06:58:03 +0000
Subject: Re: Cleaning up my messy code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-164342@lists.php.net to get a copy of this message
olinux wrote: > Try out smarty (its quite simple). You will get some > ideas on how to structure. I learned that its *ok* to > have some *display logic* in your templates (i.e. > repeating rows). (yes, some will adamantly disagree) > > Another thing i learned when using smarty is I like > using arrays to keep things organized. > > i.e. > $article['id'], $article['title'], > $article['publish_date'], $article['author'], > $article['content'] > rather than > $id, $title, $publish_date, $author, $content > > olinux I agree here. I'm new to this templating system thing, so I'm studying on it and have found the smarty concept better. I also found this article that I liked and gives a simple solution to implement in few steps to get started: http://www.sitepoint.com/article/1218 Cristian

« previous php.general (#164342) next »