php 5.6 里仅能通过 const 定义常量数组,PHP 7 可以通过define() 来定义
define('sites' , [
'Google',
'Runoob',
'Taobao'
]);
print(sites[1]);
数组可以是索引数组 可以是关联数组
defined('AAA') or define('AAA', 'zzh');
php 5.6 里仅能通过 const 定义常量数组,PHP 7 可以通过define() 来定义
define('sites' , [
'Google',
'Runoob',
'Taobao'
]);
print(sites[1]);
数组可以是索引数组 可以是关联数组
defined('AAA') or define('AAA', 'zzh');