<?php
$arr1 = array(0=>'fdipzone',1=>'terry');
$arr2 = array(0=>'php',1=>'python');
$result = array_merge($arr1, $arr2);
print_r($result);
?>
输出:
Array
(
[0] => fdipzone
[1] => terry
[2] => php
[3] => python
)
因工作需
博客列表 >数组使用数字键名,键名相同不会覆盖,且键名会重新索引
<?php
$arr1 = array(0=>'fdipzone',1=>'terry');
$arr2 = array(0=>'php',1=>'python');
$result = array_merge($arr1, $arr2);
print_r($result);
?>
输出:
Array
(
[0] => fdipzone
[1] => terry
[2] => php
[3] => python
)
因工作需