Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some experience in PHP4, but after learning the object-oriented parts of PHP, I'm having difficulty understanding how to use the Smarty template engine.

The official documentation appears to require a level of knowledge I don't have yet so it doesn't seem like a good place to start.

What do I need to know to jump into Smarty template development? Or if Smarty isn't the standard PHP template system anymore, how should I go about templating?

share|improve this question
Why PHP4, PHP 5 came out like 6 years ago? – Zachary K Apr 4 '11 at 15:04

Smarty has a good documentation but when you will use OOP its better you use something which looks better for OOP and use something like MVC when you want to learn it.

There are some Framewoks which use MVC. For small think i use smarty, too but when you have large projects you need something more then smarty i think.

and you can read the documentation on for OOP to learn it.

share|improve this answer
suggest some good books than that smarty docs. – user22115 Apr 4 '11 at 12:39
The only book i know is "Smarty PHP Template Programming and Applications" but Smarty is not so complicated that you need more then the online documentation ;) @user22115 – Stony Apr 4 '11 at 13:00
Yea I have never needed more than the online docs. – Zachary K Apr 4 '11 at 15:03

Personally, I find the smarty documentation fairly satisfying.

However, if you are not particularly proficient with PHP, that's not a smarty documentation problem, rather a lack of php knowledge problem :)

Plus, I understand that Smarty documentation is heavily based on Unix because, well, that's what PHP was originally meant to run on! Thus, if you use Windows and have never seen Unix/Linux, that might be a problem as well. My suggestion is that, if you're using Windows, you create a Linux virtual machine, something to go by like Ubuntu, RedHat, etc. That will give you all the tools to run php/smarty in the environment it was supposed to work in.

While I agree it will take you a bit more time, I am confident you will not regret this choice on the long run.

I also think Smarty holds up well for large projects. When I was using Smarty to do newer work in the intranet of an Italian bank with over 200 branches, I didn't feel Smarty was limited in any way.

share|improve this answer
If you can't comment on other answers, you can include the relevant information in your answer instead. :) I've done that for you in this case. – Adam Lear Jun 3 '11 at 17:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.