Re: [PHP Template] dynamic blocks
[email protected] (Monte Ohrt)
| Newsgroups | php.template |
|---|---|
| Organization | ispi |
| Message-ID | <[email protected]> |
>
> Yet another idea that goes along with OPTION #2, get rid of
> curly braces altogether, and use a '$' to denote variables:
>
> <if $title != "foo">
> <b>$title</b> is $$5.00
> </if>
>
> Notice double $$ to escape a literal '$'
I forgot pros and cons here for this idea...
Pros: Easy to read, much better than
{if: {title} != "foo"}
Cons: ?? If the variable name is butted up against other
text, then delimit it with braces like so:
<if $title != "foo">
${title}name
</if>