$new_arr = array();
$new_arr_other = array();
foreach($cart_data['data'] as $k => $val){
if (isset($val['is_jd']) && $val['is_jd'] == 1) {
$new_arr[] = $val;
}else{
$new_arr_other[] = $val;
}
}
$cart_data['data'] = array_merge($new_arr_other,$new_arr);//重新组合成新数组
$new_arr_other = array();
foreach($cart_data['data'] as $k => $val){
if (isset($val['is_jd']) && $val['is_jd'] == 1) {
$new_arr[] = $val;
}else{
$new_arr_other[] = $val;
}
}
$cart_data['data'] = array_merge($new_arr_other,$new_arr);//重新组合成新数组