我有一个数组:
$a = array('color' => 'green', 'format' => 'text', 'link_url');
另一个:
$b = array('zero', 'one', 'two', 'three', 'test' => 'ok', 'four');
使用array_merge()我有一个这样的数组:
Array
(
[color] => green
[format] => text
[0] => link_url
[1] => zero
[2] => one
[3] => two
[4] => three
[test] => ok
[5] => four
)
为什么 PHP 设置数组键如上?为什么不这样:
Array
(
[color] => green
[format] => text
[2] => link_url
[3] => zero
[4] => one
[5] => two
[6] => three
[test] => ok
[8] => four
)