Thread: Opinions Please
View Single Post
  #8  
Old 12-13-2012, 12:35 PM
Hall of Famer's Avatar
Hall of Famer Hall of Famer is offline
Administrator, Lead Coder
 
Join Date: Dec 2008
Location: South Brunswick
Posts: 4,448
Gender: Male
Credits: 334,037
Hall of Famer is on a distinguished road
Default

Well with Smarty things will get a lot neater, consider this:

PHP Code:
<html>
  <
head>
      <
title>{$browser_title}</title
  </
head>
  <
body>
       <
p>{$banner_image}</p>
       <
h1>{$document_title}</h1>
       <
p>{$document_content}</p>
  </
body>
</
html
Without smarty you write:

PHP Code:
<html>
  <head>
      <title><?php echo $browser_title?></title> 
  </head>
  <body>
       <p> <?php echo $banner_image?></p>
       <h1><?php echo $document_title?></h1>
       <p><?php echo $document_content;?></p>
  </body>
</html>
Now it should be all clear. XD PHP is not a good templating language, although it can be used as one(lol its main focus is the server-side programming). With Smarty, the code becomes shorter and more importantly, more pleasant to the eye. XD
__________________


Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site.
Reply With Quote