From: Fabien Potencier Date: Tue, 8 Jun 2010 06:27:02 +0000 (+0200) Subject: [doc] added hashes in the Literals paragraph X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=67746ffa6fd5304a975ff7735b44d2521a8a9662;p=web%2Fkonrad%2Ftwig.git [doc] added hashes in the Literals paragraph --- 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.