note 89455 deleted from function.define by cmb

From: Date: Sun, 06 Oct 2019 07:43:32 +0000
Subject: note 89455 deleted from function.define by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-212462@lists.php.net to get a copy of this message
Note Submitter: jv at vip dot ie ---- Probably the most efficient way of creating a constant array is to put it in a function like this: <?php function my_const_arr() { return array ( 'key1' => 'val 1', 'key2' => 'va' 2' ); } ?> Then use at will like so... <?php $my_const_arr = my_const_arr(); ?>

« previous php.notes (#212462) next »