updated doc to add arrays in the 'Literals' section
authorfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Sun, 13 Dec 2009 12:29:34 +0000 (12:29 +0000)
committerfabien <fabien@93ef8e89-cb99-4229-a87c-7fa0fa45744b>
Sun, 13 Dec 2009 12:29:34 +0000 (12:29 +0000)
git-svn-id: http://svn.twig-project.org/trunk@164 93ef8e89-cb99-4229-a87c-7fa0fa45744b

doc/02-Twig-for-Template-Designers.markdown

index 1e01190..cc9b3dd 100644 (file)
@@ -647,7 +647,8 @@ it.
 ### Literals
 
 The simplest form of expressions are literals. Literals are representations
-for PHP types such as strings and numbers. The following literals exist:
+for PHP types such as strings, numbers, and arrays. The following literals
+exist:
 
  * `"Hello World"`: Everything between two double or single quotes is a
    string. They are useful whenever you need a string in the template (for
@@ -658,6 +659,10 @@ for PHP types such as strings and numbers. The following literals 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.
+
 ### Math
 
 Twig allows you to calculate with values. This is rarely useful in templates