php数组怎么保留数字索引?
php数组怎么保留数字索引?
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?php $arr=array("4","5","6"); $arr2=array(); foreach($arr as $v){ $arr2[$v]=$v; } print_r($arr2); echo "<hr>"; $arr3=array_merge(array("1"=>"1","2"=>"..."),$arr2); print_r($arr3); ?>