nlopess Thu Dec 18 04:23:59 2003 EDT
Modified files:
/phpdoc/en/reference/math/functions mt-rand.xml octdec.xml
/phpdoc/en/reference/mime_magic/functions mime-content-type.xml
Log:
added example
Index: phpdoc/en/reference/math/functions/mt-rand.xml
diff -u phpdoc/en/reference/math/functions/mt-rand.xml:1.6
phpdoc/en/reference/math/functions/mt-rand.xml:1.7
--- phpdoc/en/reference/math/functions/mt-rand.xml:1.6 Fri May 30 15:48:38 2003
+++ phpdoc/en/reference/math/functions/mt-rand.xml Thu Dec 18 04:23:58 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
<refentry id="function.mt-rand">
<refnamediv>
@@ -33,7 +33,31 @@
between 5 and 15 (inclusive), for example, use <literal>mt_rand
(5, 15)</literal>.
</simpara>
-
+ <para>
+ <example>
+ <title><function>mt_rand</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+echo mt_rand() . "\n";
+echo mt_rand() . "\n";
+
+echo mt_rand(5, 15);
+?>
+]]>
+ </programlisting>
+ <para>
+ The above example will output something similar to:
+ </para>
+ <screen>
+<![CDATA[
+1604716014
+1478613278
+6
+]]>
+ </screen>
+ </example>
+ </para>
¬e.randomseed;
<note>
Index: phpdoc/en/reference/math/functions/octdec.xml
diff -u phpdoc/en/reference/math/functions/octdec.xml:1.3
phpdoc/en/reference/math/functions/octdec.xml:1.4
--- phpdoc/en/reference/math/functions/octdec.xml:1.3 Mon Dec 8 04:19:12 2003
+++ phpdoc/en/reference/math/functions/octdec.xml Thu Dec 18 04:23:58 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<!-- splitted from ./en/functions/math.xml, last change in rev 1.2 -->
<refentry id="function.octdec">
<refnamediv>
@@ -19,6 +19,28 @@
decimal.
</para>
<para>
+ <example>
+ <title><function>octdec</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+echo octdec('77') . "\n";
+echo octdec(decoct(45));
+?>
+]]>
+ </programlisting>
+ <para>
+ The above example will output:
+ </para>
+ <screen>
+<![CDATA[
+63
+45
+]]>
+ </screen>
+ </example>
+ </para>
+ <para>
See also <function>decoct</function>,
<function>bindec</function>,
<function>hexdec</function> and
Index: phpdoc/en/reference/mime_magic/functions/mime-content-type.xml
diff -u phpdoc/en/reference/mime_magic/functions/mime-content-type.xml:1.1
phpdoc/en/reference/mime_magic/functions/mime-content-type.xml:1.2
--- phpdoc/en/reference/mime_magic/functions/mime-content-type.xml:1.1 Tue Jun 11
06:14:50 2002
+++ phpdoc/en/reference/mime_magic/functions/mime-content-type.xml Thu Dec 18
04:23:59 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry id="function.mime-content-type">
<refnamediv>
<refname>mime_content_type</refname>
@@ -17,6 +17,28 @@
Content types are returned in MIME format, like <literal>text/plain</literal>
or <literal>application/octet-stream</literal>.
</para>
+ <para>
+ <example>
+ <title><function>mime_content_type</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+echo mime_content_type("php.gif") . "\n";
+echo mime_content_type("test.php");
+?>
+]]>
+ </programlisting>
+ <para>
+ The above example will output:
+ </para>
+ <screen>
+<![CDATA[
+image/gif
+text/plain
+]]>
+ </screen>
+ </example>
+ </para>
</refsect1>
</refentry>