didou           Tue Apr 27 17:45:48 2004 EDT

  Modified files:              
    /phpdoc/en/reference/strings/functions      trim.xml 
  Log:
  ordered text (a note about a parameter was on top, before any other text) and 
redesigned the example
  
http://cvs.php.net/diff.php/phpdoc/en/reference/strings/functions/trim.xml?r1=1.4&r2=1.5&ty=u
Index: phpdoc/en/reference/strings/functions/trim.xml
diff -u phpdoc/en/reference/strings/functions/trim.xml:1.4 
phpdoc/en/reference/strings/functions/trim.xml:1.5
--- phpdoc/en/reference/strings/functions/trim.xml:1.4  Mon Feb 16 17:22:29 2004
+++ phpdoc/en/reference/strings/functions/trim.xml      Tue Apr 27 17:45:48 2004
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
   <refentry id="function.trim">
    <refnamediv>
@@ -15,12 +15,6 @@
       <methodparam><type>string</type><parameter>str</parameter></methodparam>
       <methodparam 
choice="opt"><type>string</type><parameter>charlist</parameter></methodparam>
      </methodsynopsis>
-    <note>
-     <simpara>
-      The optional <parameter>charlist</parameter> parameter was 
-      added in PHP 4.1.0
-     </simpara>
-    </note>
     <para>
      This function returns a string with whitespace stripped from the
      beginning and end of <parameter>str</parameter>.
@@ -80,19 +74,25 @@
 <?php
 
 $text = "\t\tThese are a few words :) ...  ";
-$trimmed = trim($text);
-// $trimmed = "These are a few words :) ..."
-$trimmed = trim($text, " \t.");
-// $trimmed = "These are a few words :)"
-$clean = trim($binary, "\x00..\x1F");
+
+echo trim($text);           // "These are a few words :) ..."
+echo = trim($text, " \t."); // "These are a few words :)"
+
 // trim the ASCII control characters at the beginning and end of $binary
 // (from 0 to 31 inclusive)
+$clean = trim($binary, "\x00..\x1F");
 
 ?>
 ]]>
       </programlisting>
      </para>
     </example>
+    <note>
+     <simpara>
+      The optional <parameter>charlist</parameter> parameter was 
+      added in PHP 4.1.0
+     </simpara>
+    </note>
     <para>
      See also <function>ltrim</function> and <function>rtrim</function>.
     </para>

Reply via email to