mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-06 03:14: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
|
||||
<emphasis>{/if}</emphasis>. <emphasis>{else}</emphasis> and
|
||||
<emphasis>{elseif}</emphasis> are also permitted. All PHP conditionals
|
||||
and functions
|
||||
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>
|
||||
@@ -206,6 +208,11 @@
|
||||
{if $var is even by 3}
|
||||
...
|
||||
{/if}
|
||||
|
||||
{* check for array. *}
|
||||
{if is_array($foo) }
|
||||
...do something
|
||||
{/if}
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
Reference in New Issue
Block a user