View Single Post
Old 12-18-2007, 07:42 PM   #4 (permalink)
CMellor
The Acquainted
Upcoming Programmer 
 
CMellor's Avatar
 
Join Date: Sep 2007
Location: Leeds, UK
Posts: 141
Thanks: 6
CMellor is on a distinguished road
Default

Not sure if I understand you 100%, so apologies in advance.

I use Smarty. I have the PHP seperate from the HTML, so skinning would be easy, you wouldn't have to touch the server-side stuff.

In PHP, you'd have:

php Code:
$smarty->assign('name', $username);
and in the HMTL file:

Quote:
{$name}
Which output's the variable $username
Some people consider using Smarty as having to learn a new way of coding, but it's far from that [in my opinion]. For example, the equivalent of an if statement in Smarty is:

html Code:
<!-- GT is an equivalent of '>' -->
{if $x gt $y}
  X
{else}
  Y
{/if}

Smarty PHP
__________________
Not quite a n00b...
CMellor is offline  
Reply With Quote