我得到以下数组:
$arr = array(6 => 'Somedata', 7 => 'Somedata1', 8 => 'Somedata2');
问题是,当我使用 时array_merge( (array) "Select the data", $arr);
,它确实将数组键更改为:
Array
(
[0] => Not specified
[1] => Somedata
[2] => Somedata1
[3] => Somedata2
)
是否可以跳过array_merge
key preversion 使输出看起来像这样?
Array
(
[0] => Not specified
[6] => Somedata
[7] => Somedata1
[8] => Somedata2
)