diff --git a/docs/en/designers/language-builtin-functions/language-function-section.xml b/docs/en/designers/language-builtin-functions/language-function-section.xml
index 9882d3e7..b34ed05f 100644
--- a/docs/en/designers/language-builtin-functions/language-function-section.xml
+++ b/docs/en/designers/language-builtin-functions/language-function-section.xml
@@ -105,10 +105,10 @@ $smarty->assign('custid',$data);
- {/section}
+{* this example will print out all the values of the $custid array *}
+{section name=customer loop=$custid}
+ id: {$custid[customer]}
+{/section}
{* print out all the values of the $custid array reversed *}
{section name=foo loop=$custid step=-1}
@@ -121,9 +121,9 @@ $smarty->assign('custid',$data);
- id: 1001
- id: 1002
+id: 1000
+id: 1001
+id: 1002
id: 1002
id: 1001
@@ -183,13 +183,13 @@ $smarty->assign('address',$addr);
This example assumes that $custid, $name and $address are all
arrays containing the same number of values
*}
- {section name=customer loop=$custid}
+{section name=customer loop=$custid}
- {/section}
+{/section}
]]>
@@ -198,18 +198,18 @@ $smarty->assign('address',$addr);
- id: 1000
- name: John Smith
+ id: 1000
+ name: John Smith
address: 253 N 45th
-
- id: 1001
- name: Jack Jones
+
+ id: 1001
+ name: Jack Jones
address: 417 Mulberry ln
-
- id: 1002
- name: Jane Munson
+
+ id: 1002
+ name: Jane Munson
address: 5605 apple st
]]>
@@ -225,12 +225,12 @@ $smarty->assign('address',$addr);
as it is used to reference the data within the section
*}
{section name=anything loop=$custid}
-
@@ -413,12 +413,12 @@ $smarty->assign('contacts',$db->getAll($sql) );
{sectionelse}
- {sectionelse}
- there are no values in $custid.
- {/section}
+{* sectionelse will execute if there are no $custid values *}
+{section name=customer loop=$custid}
+ id: {$custid[customer]}
+{sectionelse}
+ there are no values in $custid.
+{/section}
]]>
@@ -446,7 +446,7 @@ $smarty->assign('contacts',$db->getAll($sql) );
Technical Note
If the step and start section properties are not
- modified, then this works the same as the iteration section
property, except it starts at 0 instead of 1.
@@ -457,9 +457,9 @@ $smarty->assign('contacts',$db->getAll($sql) );
- {/section}
+{section name=customer loop=$custid}
+ {$smarty.section.customer.index} id: {$custid[customer]}
+{/section}
]]>
@@ -467,9 +467,9 @@ $smarty->assign('contacts',$db->getAll($sql) );
- 1 id: 1001
- 2 id: 1002
+0 id: 1000
+1 id: 1001
+2 id: 1002
]]>
@@ -511,8 +511,8 @@ $smarty->assign('custid',$data);