note 120902 deleted from function.define by cmb
| From: | cmb@php.net | Date: | Tue, 31 Mar 2020 12:37:36 +0000 |
| Subject: | note 120902 deleted from function.define by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-214395@lists.php.net to get a copy of this message | ||
Note Submitter: arsicaleksa955 at gmail dot com
----
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 )