标签:foreach
对于foreach循环的使用:
foreach($remind_listas$key=>$val){
foreach($city_dataas$key1=>$val1){
if($val[‘city_id‘]==$val1[‘area_id‘]){
$remind_list_now[$arr_key][‘c_id‘] = $val[‘c_id‘];
$remind_list_now[$arr_key][‘city_id‘] = $val[‘city_id‘];
$remind_list_now[$arr_key][‘city_name‘] = $val1[‘city_name‘];
$arr_key++;
}
}
}
例子:
标签:foreach
原文地址:http://blog.csdn.net/rodgexue/article/details/45719737