私は配列を持っています:
$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
)