note 79762 added to function.define
| From: | subramani95atgmaildotcom at osu1 dot php dot net | Date: | Tue, 11 Dec 2007 21:03:04 +0000 |
| Subject: | note 79762 added to function.define | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-133373@lists.php.net to get a copy of this message | ||
<?php
define ( MESSAGE, "Hello World!");
echo MESSAGE; // Outputs "Hello World!" and issues a notice.
define ( "MSG", "Hello You");
echo MSG; // Outputs "Hello You".
?>
First argument to 'define' should be a string (it should be within quotes), otherwise you
will get a 'Notice' message (Notice: Use of undefined constant).
Regards
Subramani R.
----
Server IP: 203.199.69.133
Probable Submitter: 122.167.78.99
----
Manual Page -- http://www.php.net/manual/en/function.define.php
Edit -- https://master.php.net/note/edit/79762
Del: integrated -- https://master.php.net/note/delete/79762/integrated
Del: useless -- https://master.php.net/note/delete/79762/useless
Del: bad code -- https://master.php.net/note/delete/79762/bad+code
Del: spam -- https://master.php.net/note/delete/79762/spam
Del: non-english -- https://master.php.net/note/delete/79762/non-english
Del: in docs -- https://master.php.net/note/delete/79762/in+docs
Del: other reasons-- https://master.php.net/note/delete/79762
Reject -- https://master.php.net/note/reject/79762
Search -- https://master.php.net/manage/user-notes.php