A couple questions about templating

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey fellas, sorry to infest the list with another question about a
templating engine, but I am looking for some professional opinions
here...

I am trying to make a small, fast, and simple templating class...  Now
I have mastered the art of variable replacement, and have made two
versions.  The first one I made simply used file() to load up the file
into an array, str_replace() to replace variables, then it printed it
back.  I made a second one, which reads the file into an array,
changes the variables the same way, but instead compiles the finished
product into a compile directory and then reads the compiled file back
to the page.  the benefit to this being that I can easily create a
simple cache system now.

1st question)  I need a professionaly opinion on to which solution is
better, considering speed, security, and expandability.

2nd question)  Like I said before, I've mastered the art of variable
replacement, but how would one go about adding support for if {}
statements as well as loops.  I'm a little bit lost when it comes to
this.

Thank-you guys very very much.
-- 
jamwil.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux