mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 11:54:26 +02:00
another example
This commit is contained in:
@@ -38,14 +38,20 @@
|
|||||||
if($foo == $bar){
|
if($foo == $bar){
|
||||||
echo 'This will come out in the template';
|
echo 'This will come out in the template';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->assign('varX','Strawberry');
|
$this->assign('varX','Strawberry');
|
||||||
|
|
||||||
{/php}
|
{/php}
|
||||||
<strong>{$varX}</strong> is my fav ice cream
|
<strong>{$varX}</strong> is my fav ice cream
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
<para>The following seriously NOT recommended as its in the template scope</para>
|
||||||
|
<programlisting
|
||||||
|
<![CDATA[
|
||||||
|
{php}
|
||||||
|
print_r($some_array);
|
||||||
|
{/php}
|
||||||
|
]]>
|
||||||
|
</programlisting>
|
||||||
|
</example>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
See also
|
See also
|
||||||
|
Reference in New Issue
Block a user