mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-15 20:06:31 +00:00
added another example for the range filter
git-svn-id: http://svn.twig-project.org/trunk@172 93ef8e89-cb99-4229-a87c-7fa0fa45744b
This commit is contained in:
@@ -406,6 +406,13 @@ filter:
|
||||
The above snippet of code would print all numbers from 0 to 9 (the high value
|
||||
is never part of the generated array).
|
||||
|
||||
It can be also useful with letters:
|
||||
|
||||
[twig]
|
||||
{% for letter in 'a'|range('z') %}
|
||||
* {{ letter }}
|
||||
{% endfor %}
|
||||
|
||||
Inside of a `for` loop block you can access some special variables:
|
||||
|
||||
| Variable | Description
|
||||
|
||||
Reference in New Issue
Block a user