cvs: peardoc /peardoc2/en/package/html/html-template-flexy/attribute foreach.xml input.xml select.xml textarea.xml
/peardoc2/en/package/html/html-template-flexy/tag else.xml end.xml foreach.xml if.xml method.xml variable.xml

From: Date: Sun, 02 Feb 2003 13:37:37 +0000
Subject: cvs: peardoc /peardoc2/en/package/html/html-template-flexy/attribute foreach.xml input.xml select.xml textarea.xml
/peardoc2/en/package/html/html-template-flexy/tag else.xml end.xml foreach.xml if.xml method.xml variable.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-354@lists.php.net to get a copy of this message
alan_k Sun Feb 2 08:37:37 2003 EDT Modified files: /peardoc/peardoc2/en/package/html/html-template-flexy/attribute foreach.xml input.xml select.xml textarea.xml /peardoc/peardoc2/en/package/html/html-template-flexy/tag else.xml end.xml foreach.xml if.xml method.xml variable.xml Log: tidy up example sectoins

Index: peardoc/peardoc2/en/package/html/html-template-flexy/attribute/foreach.xml diff -u peardoc/peardoc2/en/package/html/html-template-flexy/attribute/foreach.xml:1.1 peardoc/peardoc2/en/package/html/html-template-flexy/attribute/foreach.xml:1.2 --- peardoc/peardoc2/en/package/html/html-template-flexy/attribute/foreach.xml:1.1 Sat Feb 1 09:16:44 2003 +++ peardoc/peardoc2/en/package/html/html-template-flexy/attribute/foreach.xml Sun Feb 2 08:37:36 2003 @@ -1,7 +1,7 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-template-flexy.attribute.foreach"> <refnamediv> - <refname>foreach=&quot;variable,key,value&quot;</refname> + <refname>FOREACH=&quot;variable,key,value&quot;</refname> <refpurpose>creates a PHP foreach loop using a html attribute</refpurpose> </refnamediv> <refsynopsisdiv> @@ -10,8 +10,8 @@ <funcprototype> <funcdef> <function>Usage</function></funcdef> - <paramdef><parameter>foreach=&quot;variable,key,value&quot;</parameter></paramdef> - <paramdef><parameter>foreach=&quot;variable,value&quot;</parameter></paramdef> + <paramdef><parameter>FOREACH=&quot;variable,key,value&quot;</parameter></paramdef> + <paramdef><parameter>FOREACH=&quot;variable,value&quot;</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -53,7 +53,7 @@ - <refsect1 id="package.html.html-template-flexy.attribute.foreach.example.php"> + <refsect1 id="package.html.html-template-flexy.attribute.foreach.example"> &title.example; <example> <title>Setting variables for foreach</title> @@ -64,60 +64,66 @@ "dog" => "cat", "fire" => "water" ); + +$this->b = array('a','b','c'); + $template->outputObject($this); ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.attribute.foreach.example.html"> - &title.example; + <example> <title>Foreach in template</title> <programlisting role="html"> <![CDATA[ <table> - <tr foreach="a,b,c"> - <td>b is {b}, and c is {c}</td> + <tr foreach="a,k,v"> + <td>k is {k}, and v is {v}</td> + </tr> +</table> +<table> + <tr foreach="b,v"> + <td>v is {v}</td> </tr> </table> ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.attribute.foreach.example.compiled"> - &title.example; + <example> <title>Compiled template</title> <programlisting role="html"> <![CDATA[ <table> - <?php if (is_array($t->a)) foreach($t->a as $b => $c) { ?><tr> - <td>b is <?php echo htmlspecialchars($t->b); ?>, and c is <?php echo htmlspecialchars($t->c); ?></td> + <?php if (is_array($t->a)) foreach($t->a as $k => $v) { ?><tr> + <td>k is <?php echo htmlspecialchars($t->k); ?>, and v is <?php echo htmlspecialchars($t->v); ?></td> + </tr><?php } ?> +</table> +<table> + <?php if (is_array($t->b)) foreach($t->b as $v) { ?><tr> + <td>v is <?php echo htmlspecialchars($t->v); ?></td> </tr><?php } ?> </table> - ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.attribute.foreach.example.output"> - &title.example; + <example> <title>Simple ouput example</title> <programlisting role="html"> <![CDATA[ - b is dog, c is cat - b is fire, c is water +k is dog, v is cat +k is fire, V is water + +v is a +v is b +v is c + ]]> </programlisting> Index: peardoc/peardoc2/en/package/html/html-template-flexy/attribute/input.xml diff -u peardoc/peardoc2/en/package/html/html-template-flexy/attribute/input.xml:1.1 peardoc/peardoc2/en/package/html/html-template-flexy/attribute/input.xml:1.2 --- peardoc/peardoc2/en/package/html/html-template-flexy/attribute/input.xml:1.1 Sat Feb 1 09:59:02 2003 +++ peardoc/peardoc2/en/package/html/html-template-flexy/attribute/input.xml Sun Feb 2 08:37:36 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-template.tag.input"> <refnamediv> <refname>&lt;INPUT NAME="name"&gt;</refname> @@ -27,7 +27,7 @@ - <refsect1 id="package.html.html-template-flexy.tag.input.example.php"> + <refsect1 id="package.html.html-template-flexy.tag.input.example"> &title.example; <example> <title>Setting variables for input</title> @@ -41,10 +41,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.tag.input.example.html"> - &title.example; + <example> <title>Foreach in template</title> <programlisting role="html"> @@ -57,11 +54,7 @@ ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.tag.input.example.compiled"> - &title.example; + <example> <title>Compiled template</title> <programlisting role="html"> @@ -76,11 +69,7 @@ ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.tag.input.example.output"> - &title.example; + <example> <title>Simple ouput example</title> <programlisting role="html"> Index: peardoc/peardoc2/en/package/html/html-template-flexy/attribute/select.xml diff -u peardoc/peardoc2/en/package/html/html-template-flexy/attribute/select.xml:1.1 peardoc/peardoc2/en/package/html/html-template-flexy/attribute/select.xml:1.2 --- peardoc/peardoc2/en/package/html/html-template-flexy/attribute/select.xml:1.1 Sun Feb 2 04:58:16 2003 +++ peardoc/peardoc2/en/package/html/html-template-flexy/attribute/select.xml Sun Feb 2 08:37:36 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-template-flexy.attribute.select"> <refnamediv> <refname>&lt;SELECT NAME="name"&gt;</refname> @@ -26,7 +26,7 @@ </refsect1> - <refsect1 id="package.html.html-template-flexy.attribute.select.example.php"> + <refsect1 id="package.html.html-template-flexy.attribute.select.example"> &title.example; <example> <title>Setting variables for input</title> @@ -64,10 +64,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.attribute.select.example.html"> - &title.example; + <example> <title>Foreach in template</title> <programlisting role="html"> @@ -86,11 +83,7 @@ ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.attribute.select.example.compiled"> - &title.example; + <example> <title>Compiled template</title> <programlisting role="html"> @@ -118,11 +111,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.attribute.select.example.output"> - &title.example; <example> <title>Simple ouput example</title> <programlisting role="html"> Index: peardoc/peardoc2/en/package/html/html-template-flexy/attribute/textarea.xml diff -u peardoc/peardoc2/en/package/html/html-template-flexy/attribute/textarea.xml:1.1 peardoc/peardoc2/en/package/html/html-template-flexy/attribute/textarea.xml:1.2 --- peardoc/peardoc2/en/package/html/html-template-flexy/attribute/textarea.xml:1.1 Sat Feb 1 09:59:02 2003 +++ peardoc/peardoc2/en/package/html/html-template-flexy/attribute/textarea.xml Sun Feb 2 08:37:36 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-template.tag.textarea"> <refnamediv> <refname>&lt;TEXTAREA NAME="name"&gt;</refname> @@ -27,7 +27,7 @@ - <refsect1 id="package.html.html-template-flexy.tag.textarea.example.php"> + <refsect1 id="package.html.html-template-flexy.tag.textarea.example"> &title.example; <example> <title>Setting variables for input</title> @@ -41,10 +41,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.tag.textarea.example.html"> - &title.example; + <example> <title>Foreach in template</title> <programlisting role="html"> @@ -57,11 +54,7 @@ ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.tag.textarea.example.compiled"> - &title.example; + <example> <title>Compiled template</title> <programlisting role="html"> @@ -78,11 +71,7 @@ ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.tag.textarea.example.output"> - &title.example; + <example> <title>Simple ouput example</title> <programlisting role="html"> Index: peardoc/peardoc2/en/package/html/html-template-flexy/tag/else.xml diff -u peardoc/peardoc2/en/package/html/html-template-flexy/tag/else.xml:1.1 peardoc/peardoc2/en/package/html/html-template-flexy/tag/else.xml:1.2 --- peardoc/peardoc2/en/package/html/html-template-flexy/tag/else.xml:1.1 Sun Feb 2 04:58:16 2003 +++ peardoc/peardoc2/en/package/html/html-template-flexy/tag/else.xml Sun Feb 2 08:37:37 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-template-flexy.tag.else"> <refnamediv> <refname>{else:}</refname> @@ -25,7 +25,7 @@ - <refsect1 id="package.html.html-template-flexy.tag.else.example.php"> + <refsect1 id="package.html.html-template-flexy.tag.else.example"> &title.example; <example> <title>Setting variables for if</title> @@ -46,10 +46,7 @@ ]]> </programlisting> </example> - </refsect1> - <refsect1 id="package.html.html-template-flexy.tag.else.example.html"> - &title.example; <example> <title>Else in template</title> <programlisting role="html"> @@ -61,11 +58,7 @@ ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.tag.else.example.compiled"> - &title.example; + <example> <title>Compiled template</title> <programlisting role="html"> @@ -77,11 +70,7 @@ ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.tag.else.example.output"> - &title.example; + <example> <title>Simple ouput example</title> <programlisting role="html"> Index: peardoc/peardoc2/en/package/html/html-template-flexy/tag/end.xml diff -u peardoc/peardoc2/en/package/html/html-template-flexy/tag/end.xml:1.1 peardoc/peardoc2/en/package/html/html-template-flexy/tag/end.xml:1.2 --- peardoc/peardoc2/en/package/html/html-template-flexy/tag/end.xml:1.1 Sun Feb 2 04:58:16 2003 +++ peardoc/peardoc2/en/package/html/html-template-flexy/tag/end.xml Sun Feb 2 08:37:37 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-template-flexy.tag.end"> <refnamediv> <refname>{end:}</refname> @@ -29,7 +29,7 @@ - <refsect1 id="package.html.html-template-flexy.tag.end.example.php"> + <refsect1 id="package.html.html-template-flexy.tag.end.example"> &title.example; <example> <title>Setting variables for if</title> @@ -53,10 +53,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.tag.end.example.html"> - &title.example; + <example> <title>Foreach in template</title> <programlisting role="html"> @@ -68,11 +65,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.tag.end.example.compiled"> - &title.example; <example> <title>Compiled template</title> <programlisting role="html"> @@ -85,11 +78,7 @@ ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.tag.end.example.output"> - &title.example; + <example> <title>Simple ouput example</title> <programlisting role="html"> Index: peardoc/peardoc2/en/package/html/html-template-flexy/tag/foreach.xml diff -u peardoc/peardoc2/en/package/html/html-template-flexy/tag/foreach.xml:1.1 peardoc/peardoc2/en/package/html/html-template-flexy/tag/foreach.xml:1.2 --- peardoc/peardoc2/en/package/html/html-template-flexy/tag/foreach.xml:1.1 Sat Feb 1 09:16:44 2003 +++ peardoc/peardoc2/en/package/html/html-template-flexy/tag/foreach.xml Sun Feb 2 08:37:37 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-template-flexy.tag.foreach"> <refnamediv> <refname>{foreach:variable,key,value}</refname> @@ -53,7 +53,7 @@ - <refsect1 id="package.html.html-template-flexy.tag.foreach.example.php"> + <refsect1 id="package.html.html-template-flexy.tag.foreach.example"> &title.example; <example> <title>Setting variables for foreach</title> @@ -64,59 +64,61 @@ "dog" => "cat", "fire" => "water" ); +$this-b = array('a','b','c'); + $template->outputObject($this); ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.tag.foreach.example.html"> - &title.example; + <example> <title>Foreach in template</title> <programlisting role="html"> <![CDATA[ -{foreach:a,b,c} - b is {b}, and c is {c} +{foreach:a,k,v} + k is {k}, and v is {v} +{end:} +{foreach:b,v} + v is {v} {end:} ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.tag.foreach.example.compiled"> - &title.example; + <example> <title>Compiled template</title> <programlisting role="html"> <![CDATA[ - <?php if (is_array($t->a)) foreach($t->a as $b => $c) { ?> - b is <?php echo htmlspecialchars($t->b); ?>, and c is <?php echo htmlspecialchars($t->c); ?> + <?php if (is_array($t->a)) foreach($t->a as $k => $v) { ?> + k is <?php echo htmlspecialchars($t->k); ?>, and v is <?php echo htmlspecialchars($t->v); ?> +<?php } ?> +<?php if (is_array($t->a)) foreach($t->b as $v) { ?> + v is <?php echo htmlspecialchars($t->v); ?> <?php } ?> + ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.tag.foreach.example.output"> - &title.example; + <example> - <title>Simple ouput example</title> + <title>example output</title> <programlisting role="html"> <![CDATA[ - b is dog, c is cat - b is fire, c is water +k is dog, v is cat +k is fire, v is water +v is a +v is b +v is c + ]]> </programlisting> Index: peardoc/peardoc2/en/package/html/html-template-flexy/tag/if.xml diff -u peardoc/peardoc2/en/package/html/html-template-flexy/tag/if.xml:1.1 peardoc/peardoc2/en/package/html/html-template-flexy/tag/if.xml:1.2 --- peardoc/peardoc2/en/package/html/html-template-flexy/tag/if.xml:1.1 Sun Feb 2 04:58:16 2003 +++ peardoc/peardoc2/en/package/html/html-template-flexy/tag/if.xml Sun Feb 2 08:37:37 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-template-flexy.tag.if"> <refnamediv> <refname>{if:variable}</refname> @@ -53,10 +53,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.tag.if.example.html"> - &title.example; + <example> <title>Foreach in template</title> <programlisting role="html"> @@ -68,11 +65,7 @@ ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.tag.if.example.compiled"> - &title.example; + <example> <title>Compiled template</title> <programlisting role="html"> @@ -85,11 +78,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.tag.if.example.output"> - &title.example; <example> <title>Simple ouput example</title> <programlisting role="html"> Index: peardoc/peardoc2/en/package/html/html-template-flexy/tag/method.xml diff -u peardoc/peardoc2/en/package/html/html-template-flexy/tag/method.xml:1.1 peardoc/peardoc2/en/package/html/html-template-flexy/tag/method.xml:1.2 --- peardoc/peardoc2/en/package/html/html-template-flexy/tag/method.xml:1.1 Sun Feb 2 04:58:16 2003 +++ peardoc/peardoc2/en/package/html/html-template-flexy/tag/method.xml Sun Feb 2 08:37:37 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.1 $ --> +<!-- $Revision: 1.2 $ --> <refentry id="package.html.html-template-flexy.tag.method"> <refnamediv> <refname>{method(arguments,#quoted arguments#)}</refname> @@ -40,7 +40,7 @@ - <refsect1 id="package.html.html-template-flexy.tag.method.example.php"> + <refsect1 id="package.html.html-template-flexy.tag.method.example"> &title.example; <example> <title>Including another template</title> @@ -62,10 +62,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.tag.method.example.html"> - &title.example; + <example> <title>Calling includeBody in template</title> <programlisting role="html"> @@ -80,11 +77,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.tag.method.example.compiled"> - &title.example; <example> <title>Compiled template</title> <programlisting role="html"> Index: peardoc/peardoc2/en/package/html/html-template-flexy/tag/variable.xml diff -u peardoc/peardoc2/en/package/html/html-template-flexy/tag/variable.xml:1.2 peardoc/peardoc2/en/package/html/html-template-flexy/tag/variable.xml:1.3 --- peardoc/peardoc2/en/package/html/html-template-flexy/tag/variable.xml:1.2 Sun Feb 2 04:58:16 2003 +++ peardoc/peardoc2/en/package/html/html-template-flexy/tag/variable.xml Sun Feb 2 08:37:37 2003 @@ -1,4 +1,4 @@ -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id="package.html.html-template-flexy.tag.variable"> <refnamediv> <refname>{variable}</refname> @@ -34,7 +34,7 @@ - <refsect1 id="package.html.html-template-flexy.tag.variable.example.php"> + <refsect1 id="package.html.html-template-flexy.tag.variable.example"> &title.example; <example> <title>Setting variables for foreach</title> @@ -48,10 +48,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.tag.variable.example.html"> - &title.example; + <example> <title>Foreach in template</title> <programlisting role="html"> @@ -64,11 +61,7 @@ ]]> </programlisting> </example> - </refsect1> - - - <refsect1 id="package.html.html-template-flexy.tag.variable.example.compiled"> - &title.example; + <example> <title>Compiled template</title> <programlisting role="html"> @@ -83,11 +76,7 @@ ]]> </programlisting> </example> - </refsect1> - - <refsect1 id="package.html.html-template-flexy.tag.variable.example.output"> - &title.example; <example> <title>Simple ouput example</title> <programlisting role="html">
« previous php.pear.doc (#354) next »