diff options
Diffstat (limited to 'docu/language_definition.html')
-rw-r--r-- | docu/language_definition.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docu/language_definition.html b/docu/language_definition.html index a21a869..84232de 100644 --- a/docu/language_definition.html +++ b/docu/language_definition.html @@ -380,6 +380,14 @@ <code><pre><ste:foreach array="foo" key="k" value="v" counter="i"><br /> Number: $i<br /><br /> Key: $k<br /><br /> Value: $v<br /><br /> <br /><br /></ste:foreach></pre></code> This code will loop through the array <code>foo</code> and return the counter <code>$i</code>, the key <code>$k</code> and the value <code>$v</code> of the current iteration. </p> + <p> + There can also be an optional <code><ste:else></code> clause, that will be executed, if the input array was empty. + </p> + <p> + Example:<br /> + <code><pre><ste:foreach array="foo" value="v"><br /> <p>$v</p><br /> <ste:else><br /> Array \$foo is empty.<br /> </ste:else><br /></ste:foreach></pre></code> + This code will list all array elements or will display <code>Array $foo is empty</code> if the array <code>$foo</code> is empty. + </p> <h3 id="builtin_infloop">ste:infloop</h3> <p>Creates an infinitive loop. You can get out of the loop using the <a href="#builtin_break">ste:break</a> tag. Can be used to emulate other loop constructs like while loops.</p> |