aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/twig/twig/doc/filters/sort.rst
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/twig/twig/doc/filters/sort.rst')
-rw-r--r--vendor/twig/twig/doc/filters/sort.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/vendor/twig/twig/doc/filters/sort.rst b/vendor/twig/twig/doc/filters/sort.rst
new file mode 100644
index 00000000..33311528
--- /dev/null
+++ b/vendor/twig/twig/doc/filters/sort.rst
@@ -0,0 +1,17 @@
1``sort``
2========
3
4The ``sort`` filter sorts an array:
5
6.. code-block:: jinja
7
8 {% for user in users|sort %}
9 ...
10 {% endfor %}
11
12.. note::
13
14 Internally, Twig uses the PHP `asort`_ function to maintain index
15 association.
16
17.. _`asort`: http://php.net/asort