mg              Wed Aug 18 17:11:52 2004 EDT

  Modified files:              
    /phpdoc/en/reference/xattr/functions        xattr-set.xml 
  Log:
  Add example.
  
  
http://cvs.php.net/diff.php/phpdoc/en/reference/xattr/functions/xattr-set.xml?r1=1.1&r2=1.2&ty=u
Index: phpdoc/en/reference/xattr/functions/xattr-set.xml
diff -u phpdoc/en/reference/xattr/functions/xattr-set.xml:1.1 
phpdoc/en/reference/xattr/functions/xattr-set.xml:1.2
--- phpdoc/en/reference/xattr/functions/xattr-set.xml:1.1       Sat Aug 14 19:39:49 
2004
+++ phpdoc/en/reference/xattr/functions/xattr-set.xml   Wed Aug 18 17:11:52 2004
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='iso-8859-1'?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
 <!-- Generated by xml_proto.php v2.0. Found in /scripts directory of phpdoc. -->
   <refentry id="function.xattr-set">
    <refnamediv>
@@ -62,6 +62,26 @@
      See also <function>xattr_get</function>, <function>xattr_remove</function>, 
      <function>xattr_list</function>.
     </para>
+    <example>
+     <title><function>xattr_set</function> example</title>
+     <para>
+      The following code sets extended attributes on .wav file.
+     </para>
+     <programlisting role="php">
+<![CDATA[
+<?php
+$file = 'my_favourite_song.wav;
+xattr_set($file, 'Artist', 'Someone');
+xattr_set($file, 'My ranking', 'Good');
+xattr_set($file, 'Listen count', '34');
+
+/* ... other code ... */
+
+printf("You've played this song %d times", xattr_get($file, 'Listen count')); 
+?>
+]]>
+     </programlisting>
+    </example>
    </refsect1>
   </refentry>
 

Reply via email to