cvs: smarty /docs/en/designers/language-basic-syntax language-syntax-variables.xml

"Monte Ohrt" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmohrt1103035233@cvsserver>
mohrt		Tue Dec 14 09:40:33 2004 EDT

  Modified files:              
    /smarty/docs/en/designers/language-basic-syntax	
                                                   	language-syntax-variables.xml 
  Log:
  adjust examples/syntax
  
  
http://cvs.php.net/diff.php/smarty/docs/en/designers/language-basic-syntax/language-syntax-variables.xml?r1=1.1&r2=1.2&ty=u
Index: smarty/docs/en/designers/language-basic-syntax/language-syntax-variables.xml
diff -u smarty/docs/en/designers/language-basic-syntax/language-syntax-variables.xml:1.1 smarty/docs/en/designers/language-basic-syntax/language-syntax-variables.xml:1.2
--- smarty/docs/en/designers/language-basic-syntax/language-syntax-variables.xml:1.1	Mon Dec 13 15:27:22 2004
+++ smarty/docs/en/designers/language-basic-syntax/language-syntax-variables.xml	Tue Dec 14 09:40:32 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
 <sect1 id="language.syntax.variables">
  <title>Variables</title>
  <para>
@@ -17,12 +17,22 @@
 {$foo}        <-- displaying a simple variable (non array/object)
 {$foo[4]}     <-- display the 5th element of a zero-indexed array
 {$foo.bar}    <-- display the "bar" key value of an array, similar to PHP $foo['bar']
-{$foo.$bar}   <-- display the key value of an array denoted by the value $bar
+{$foo.$bar}   <-- display variable key value of an array, similar to PHP $foo[$bar]
 {$foo->bar}   <-- display the object property "bar"
-{$foo->bar()} <-- display the object method return value for "bar"
+{$foo->bar()} <-- display the object method "bar"
 {#foo#}       <-- display the config file variable "foo"
 {$smarty.config.foo} <-- synonym for {#foo#}
 {$foo[bar]}   <-- syntax only valid in a section loop, see {section}
+
+Many other combinations are allowed
+
+{$foo.bar.baz}
+{$foo.$bar.$baz}
+{$foo[4].baz}
+{$foo[4].$baz}
+{$foo.bar.baz[4]}
+{$foo->bar($baz,2,$bar)} <-- passing parameters
+{"foo"}       <-- static values are allowed
 ]]>
   </programlisting>
  </example>

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.