svn: /phpdoc/en/trunk/reference/zip/ziparchive/ getnameindex.xml
| From: | Justin Martin | Date: | Mon, 05 Dec 2011 09:41:11 +0000 |
| Subject: | svn: /phpdoc/en/trunk/reference/zip/ziparchive/ getnameindex.xml | ||
| Groups: | php.doc.cvs | ||
| Request: | Send a blank email to doc-cvs+get-9152@lists.php.net to get a copy of this message | ||
frozenfire Mon, 05 Dec 2011 09:41:11 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=320405
Log:
Added example. Closes bug #54079.
Bug: https://bugs.php.net/54079 (Open) Missing
documentation
Changed paths:
U phpdoc/en/trunk/reference/zip/ziparchive/getnameindex.xml
Modified: phpdoc/en/trunk/reference/zip/ziparchive/getnameindex.xml
===================================================================
--- phpdoc/en/trunk/reference/zip/ziparchive/getnameindex.xml 2011-12-05 09:37:56 UTC (rev 320404)
+++ phpdoc/en/trunk/reference/zip/ziparchive/getnameindex.xml 2011-12-05 09:41:11 UTC (rev 320405)
@@ -46,6 +46,26 @@
Returns the name on success&return.falseforfailure;.
</para>
</refsect1>
+ <refsect1 role="examples">
+ &reftitle.examples;
+ <para>
+ <example>
+ <title><function>getnameindex</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+if ($zip->open('test.zip') == TRUE) {
+ for ($i = 0; $i < $zip->numFiles; $i++;) {
+ $filename = $zip->getNameIndex($i);
+ // ...
+ }
+}
+?>
+]]>
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
</refentry>
<!-- Keep this comment at the end of the file