note 120902 added to function.define
| From: | arsicaleksa955 at gmail dot com | Date: | Thu, 30 Mar 2017 09:14:44 +0000 |
| Subject: | note 120902 added to function.define | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-208959@lists.php.net to get a copy of this message | ||
You can also define associative array as constant:
<?php
define("DB", [
"DB_HOST_NAME" => "localhost",
"DB_USER_NAME" => "root",
"DB_PASSWORD" => "password",
"DB_DATABASE" => "db_example"
]);
prin_r(DB);
Array ( [DB_HOST_NAME] => localhost [DB_USER_NAME] => root [DB_PASSWORD] => password
[DB_DATABASE] => db_example )
----
Server IP: 72.52.91.14
Probable Submitter: 5.133.155.148
----
Manual Page -- http://php.net/manual/en/function.define.php
Edit -- https://master.php.net/note/edit/120902
Del: integrated -- https://master.php.net/note/delete/120902/integrated
Del: useless -- https://master.php.net/note/delete/120902/useless
Del: bad code -- https://master.php.net/note/delete/120902/bad+code
Del: spam -- https://master.php.net/note/delete/120902/spam
Del: non-english -- https://master.php.net/note/delete/120902/non-english
Del: in docs -- https://master.php.net/note/delete/120902/in+docs
Del: other reasons-- https://master.php.net/note/delete/120902
Reject -- https://master.php.net/note/reject/120902
Search -- https://master.php.net/manage/user-notes.php