Looking for a php template Parser with nesting

Posted by christian on Stack Overflow See other posts from Stack Overflow or by christian
Published on 2010-05-01T12:01:11Z Indexed on 2010/05/01 12:07 UTC
Read the original article Hit count: 337

Filed under:
|

Hi

Iam looking for a php parser that can do this.

{tag} Replace the tag with text comming from a function

{tag(params)} It must support params

{tag({tag(params)},{tag(params)})} It must support nesting

{tag()?

else

} It must support Tests

{$tag=value} It must support varriables

Do anyone of you know of an parser that can do this?

Or maby you know how i can create one. I have tryed to do this with preg, but it seems impossible to create nesting.

Smarty seems to be a bit to big, and i dont know if you can disable all the extra functionality it has. I only need the functionality that i have listet over. In smarty your able to write php code and i dont like that. {php} {/php} So if iam going to use that i need to be able to turn it of.

(Iam going to use it with codeigniter.)

© Stack Overflow or respective owner

Related posts about php

Related posts about php5