cvs: peardoc /peardoc2/en/package/html/html-template-flexy/attribute foreach.xml /peardoc2/en/package/html/html-template-flexy/tag foreach.xml
variable.xml

From: Date: Sat, 01 Feb 2003 14:16:44 +0000
Subject: cvs: peardoc /peardoc2/en/package/html/html-template-flexy/attribute foreach.xml /peardoc2/en/package/html/html-template-flexy/tag foreach.xml
variable.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-339@lists.php.net to get a copy of this message
alan_k Sat Feb 1 09:16:44 2003 EDT Added files: /peardoc/peardoc2/en/package/html/html-template-flexy/attribute foreach.xml /peardoc/peardoc2/en/package/html/html-template-flexy/tag foreach.xml variable.xml Log: change tags to tag, and add beginings of attributes

Index: peardoc/peardoc2/en/package/html/html-template-flexy/attribute/foreach.xml +++ peardoc/peardoc2/en/package/html/html-template-flexy/attribute/foreach.xml <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-template-flexy.attribute.foreach"> <refnamediv> <refname>foreach=&quot;variable,key,value&quot;</refname> <refpurpose>creates a PHP foreach loop using a html attribute</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <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> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.html.html-template-flexy.attribute.foreach.desc"> &title.desc; <para> creates a foreach loop, around the tag and close tag. </para> </refsect1> <refsect1 id="package.html.html-template-flexy.attribute.foreach.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string variable</parameter> - relates to $object->variable </para> </listitem> <listitem> <para> <parameter>string key</parameter> - creates a variable 'key' in the current scope. </para> </listitem> <listitem> <para> <parameter>string value</parameter> - optionally creates a variable 'value' in the current scope. (as in $key=>$value) </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.html.html-template-flexy.attribute.foreach.example.php"> &title.example; <example> <title>Setting variables for foreach</title> <programlisting role="html"> <![CDATA[ $this->a = array( "dog" => "cat", "fire" => "water" ); $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> </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> </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 ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/peardoc2/en/package/html/html-template-flexy/tag/foreach.xml +++ peardoc/peardoc2/en/package/html/html-template-flexy/tag/foreach.xml <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-template-flexy.tag.foreach"> <refnamediv> <refname>{foreach:variable,key,value}</refname> <refpurpose>creates a PHP foreach loop</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef> <function>Usage</function></funcdef> <paramdef><parameter>{foreach:variable,key,value}</parameter></paramdef> <paramdef><parameter>{foreach:variable,value}</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.html.html-template-flexy.tag.foreach.desc"> &title.desc; <para> creates a foreach loop, needs and {end:} tag. </para> </refsect1> <refsect1 id="package.html.html-template-flexy.tag.foreach.parameter"> &title.param; <para> <itemizedlist> <listitem> <para> <parameter>string variable</parameter> - relates to $object->variable </para> </listitem> <listitem> <para> <parameter>string key</parameter> - creates a variable 'key' in the current scope. </para> </listitem> <listitem> <para> <parameter>string value</parameter> - optionally creates a variable 'value' in the current scope. (as in $key=>$value) </para> </listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.html.html-template-flexy.tag.foreach.example.php"> &title.example; <example> <title>Setting variables for foreach</title> <programlisting role="html"> <![CDATA[ $this->a = array( "dog" => "cat", "fire" => "water" ); $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} {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 } ?> ]]> </programlisting> </example> </refsect1> <refsect1 id="package.html.html-template-flexy.tag.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 ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> Index: peardoc/peardoc2/en/package/html/html-template-flexy/tag/variable.xml +++ peardoc/peardoc2/en/package/html/html-template-flexy/tag/variable.xml <!-- $Revision: 1.1 $ --> <refentry id="package.html.html-template.tag.variable"> <refnamediv> <refname>{variable}</refname> <refpurpose>creates a PHP echo variable</refpurpose> </refnamediv> <refsynopsisdiv> <funcsynopsis> <funcprototype> <funcdef> <function>Usage</function></funcdef> <paramdef><parameter>{variable}</parameter></paramdef> <paramdef><parameter>{variable:h}</parameter></paramdef> <paramdef><parameter>{variable:u}</parameter></paramdef> </funcprototype> </funcsynopsis> </refsynopsisdiv> <refsect1 id="package.html.html-template-flexy.tag.variable.desc"> &title.desc; <para> creates an echo variable, with optional modifier. Modifiers area </para> <para> <itemizedlist> <listitem><simpara>No Modifier - does htmlspecialchars($variable)</simpara></listitem> <listitem><simpara>:h - echos without any change - eg. raw</simpara></listitem> <listitem><simpara>:u - echos urlencode($variable)</simpara></listitem> </itemizedlist> </para> </refsect1> <refsect1 id="package.html.html-template-flexy.tag.variable.example.php"> &title.example; <example> <title>Setting variables for foreach</title> <programlisting role="html"> <![CDATA[ $this->a = "hello >>"; $template->outputObject($this); ]]> </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"> <![CDATA[ {a} {a:h} {a:u} ]]> </programlisting> </example> </refsect1> <refsect1 id="package.html.html-template-flexy.tag.variable.example.compiled"> &title.example; <example> <title>Compiled template</title> <programlisting role="html"> <![CDATA[ <?php echo htmlspecialchars($t->a); ?> <?php echo $t->a; ?> <?php echo urlencode($t->a); ?> ]]> </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"> <![CDATA[ hello &gt;&gt; hello >> hello+%3E%3 ]]> </programlisting> </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->
« previous php.pear.doc (#339) next »