mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 20:04:27 +02:00
added php function example
This commit is contained in:
@@ -9,8 +9,10 @@
|
|||||||
Every <emphasis>{if}</emphasis> must be paired with an
|
Every <emphasis>{if}</emphasis> must be paired with an
|
||||||
<emphasis>{/if}</emphasis>. <emphasis>{else}</emphasis> and
|
<emphasis>{/if}</emphasis>. <emphasis>{else}</emphasis> and
|
||||||
<emphasis>{elseif}</emphasis> are also permitted. All PHP conditionals
|
<emphasis>{elseif}</emphasis> are also permitted. All PHP conditionals
|
||||||
|
and functions
|
||||||
are recognized, such as <emphasis>||</emphasis>, <emphasis>or</emphasis>,
|
are recognized, such as <emphasis>||</emphasis>, <emphasis>or</emphasis>,
|
||||||
<emphasis>&&</emphasis>, <emphasis>and</emphasis>, etc.
|
<emphasis>&&</emphasis>, <emphasis>and</emphasis>,
|
||||||
|
<emphasis>is_array()</emphasis>, etc.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
@@ -206,6 +208,11 @@
|
|||||||
{if $var is even by 3}
|
{if $var is even by 3}
|
||||||
...
|
...
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
{* check for array. *}
|
||||||
|
{if is_array($foo) }
|
||||||
|
...do something
|
||||||
|
{/if}
|
||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</example>
|
</example>
|
||||||
|
Reference in New Issue
Block a user