cvs: phpdoc /en/functions misc.xml
| From: | Ron Chmara | Date: | Thu, 02 Nov 2000 06:38:45 +0000 |
| Subject: | cvs: phpdoc /en/functions misc.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969332760@lists.php.net to get a copy of this message | ||
ronabop Wed Nov 1 22:38:45 2000 EDT
Modified files:
/phpdoc/en/functions misc.xml
Log:
Example for defined()
Index: phpdoc/en/functions/misc.xml
diff -u phpdoc/en/functions/misc.xml:1.33 phpdoc/en/functions/misc.xml:1.34
--- phpdoc/en/functions/misc.xml:1.33 Fri Sep 15 09:09:43 2000
+++ phpdoc/en/functions/misc.xml Wed Nov 1 22:38:45 2000
@@ -171,6 +171,16 @@
<para>
Returns true if the named constant given by
<parameter>name</parameter> has been defined, false otherwise.
+ <example>
+ <title>Checking Constants</title>
+ <programlisting role="php">
+<?php
+if (defined("CONSTANT")){ // Note that it should be quoted
+ echo CONSTANT; //
+ }
+?>
+ </programlisting>
+ </example>
</para>
<para>
See also <function>define</function> and the section on <link