The question is stupid, but still: I saw in the layout the insertion of functions (or not them) through curly brackets ( {чего-то там} ). I would like to know what it is and why? I have been interested for a long time, but I could not find it, I use <?php func(); ?> myself <?php func(); ?> <?php func(); ?> .

    4 answers 4

    Posted template, something similar to yukozovsky, works fine, there are nested conditions

     <if{condition}>$CODE$<else>$CODE_1$</if> 

    All templates are stored in a tpl file, respectively, in them there is no php-code. If interested - I can send.


    Template Test - http://f.static.sfcdn.soundsforge.net/

    Sources - http://f.static.sfcdn.soundsforge.net/sfcdn.static.6s54h48tG4s.rar

    most likely they were templates and as an option Smarty in this direction and dig

    • vsmysle templates? those. if I have a self-writing engine, then I don't need it?)) - Sleepless
    • Well, if you want to use a template engine, then yes, well, and if you have less or less a project is not small in the form of several pages. read in nete about template engines. - Artem

    Usually when using templates like this.

      I always got the file_get_contents template, then replaced it with str_replace and output the template.