From 67746ffa6fd5304a975ff7735b44d2521a8a9662 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 8 Jun 2010 08:27:02 +0200 Subject: [PATCH] [doc] added hashes in the Literals paragraph --- doc/02-Twig-for-Template-Designers.markdown | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/02-Twig-for-Template-Designers.markdown b/doc/02-Twig-for-Template-Designers.markdown index f56506b..34be297 100644 --- a/doc/02-Twig-for-Template-Designers.markdown +++ b/doc/02-Twig-for-Template-Designers.markdown @@ -802,10 +802,12 @@ exist: writing the number down. If a dot is present the number is a float, otherwise an integer. - * `[foo, bar]`: Arrays are defined by a sequence of expressions separated by - a comma (`,`) and wrapped with squared brackets (`[]`). As an array element - can be any valid expression, arrays can be nested. The array notation is - only available as of Twig 0.9.5. + * `[foo, bar]` (new in Twig 0.9.5): Arrays are defined by a sequence of + expressions separated by a comma (`,`) and wrapped with squared brackets + (`[]`). As an array element can be any valid expression, arrays can be + nested. Like PHP, arrays can also have named items (hashes) like `['foo': + 'foo', 'bar': 'bar']`. You can even mix and match both syntaxes: `['foo': + 'foo', 'bar']`. * `true` / `false` / `none`: `true` represents the true value, `false` represents the false value. -- 1.7.2.5