Grasp.Today

php 数组合并方法

     $new = array();
            if ($relateddepartmentsnew) {
                foreach ($relateddepartmentsnew as $relatK=>$relatV) {
                    $new[$relatK]['relateddepartments'] = $relatV;
                }
            }
            if ($zzfgnew) {
                foreach ($zzfgnew as $zzfgK=>$zzfgV) {
                    $new[$zzfgK]['zzfg'] = $zzfgV;
                }
            }

 

posted @ 2015-11-27 16:31  gaohj  阅读(237)  评论(0编辑  收藏  举报