cvs: smarty /docs/en/designers/language-builtin-functions language-function-php.xml

[email protected] ("Peter 'Mash' Morgan") Tue, 28 Mar 2006 01:15:34 -0000
Newsgroups php.smarty.cvs
Message-ID <cvspete_morgan1143508534@cvsserver>
pete_morgan		Tue Mar 28 01:15:34 2006 UTC

  Modified files:              
    /smarty/docs/en/designers/language-builtin-functions	
                                                        	language-function-php.xml 
  Log:
  added an example
  
http://cvs.php.net/viewcvs.cgi/smarty/docs/en/designers/language-builtin-functions/language-function-php.xml?r1=1.8&r2=1.9&diff_format=u
Index: smarty/docs/en/designers/language-builtin-functions/language-function-php.xml
diff -u smarty/docs/en/designers/language-builtin-functions/language-function-php.xml:1.8 smarty/docs/en/designers/language-builtin-functions/language-function-php.xml:1.9
--- smarty/docs/en/designers/language-builtin-functions/language-function-php.xml:1.8	Fri Feb 17 22:18:51 2006
+++ smarty/docs/en/designers/language-builtin-functions/language-function-php.xml	Tue Mar 28 01:15:34 2006
@@ -1,16 +1,16 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
 <sect1 id="language.function.php">
  <title>{php}</title>
  <para>
-  {php} tags allow php to be embedded directly into the template. They
+  The {php} tags allow PHP code to be embedded directly into the template. They
   will not be escaped, regardless of the <link
   linkend="variable.php.handling">$php_handling</link> setting. This
-  is for advanced users only, not normally needed.
+  is for advanced users only, not normally needed and not recommended.
  </para>
  <example>
   <title>{php} tags</title>
-  <programlisting role="php">
+  <programlisting>
 <![CDATA[
 {php}
    // including a php script directly
@@ -30,15 +30,19 @@
 </note>
 
  <example>
-  <title>{php} tags with global</title>
+  <title>{php} tags with global and assigning a variable</title>
   <programlisting role="php">
 <![CDATA[
 {php}
    global $foo, $bar;
    if($foo == $bar){
-     // do something
+     echo 'This will come out in the template';
    }
+
+$this->assign('varX','Strawberry');
+
 {/php}
+<strong>{$varX}</strong> is my fav ice cream
 ]]>
   </programlisting>
  </example>