标签:nop world 字符 color style 默认 type ace php基础
数组的定义:
array( key => value
, ... ) // 键(key)可以是一个整数或字符串,键可以省略,默认从0开始索引 // 值(value)可以是任意类型的值
或者简写的方式:
[
key => value
, ...
];
例子:
$array = array(
"foo" => "bar",
"bar" => "foo",
100 => -100,
-100 => 100,
);
$array = array("foo", "bar", "hallo", "world");
$array = array(
"foo" => "bar",
42 => 24,
"multi" => array(
"dimensional" => array(
"array" => "foo"
)
)
);
标签:nop world 字符 color style 默认 type ace php基础
原文地址:http://www.cnblogs.com/learnsimida/p/5991602.html