21,887
社区成员
发帖
与我相关
我的任务
分享
<meta charset="utf-8">
<?php
$arra = array(
0 => array(
'id' => 0,
'send_mobile'=> '13267310236',
'c_content'=>'天气很热注意防暑'
),
1 => array(
'id' => 1,
'send_mobile'=> '13267310285',
'c_content'=>'天气很热注意防暑'
),
2 => array(
'id' => 2,
'send_mobile'=> '13267310126',
'c_content'=>'天气很热注意防暑'
),
3 => array(
'id' => 3,
'send_mobile'=> '13267310166',
'c_content'=>'天气防暑'
)
);
$arrb = array();
foreach ($arra as $v){
$b = $v['c_content'];
if(isset($arrb[$b]))
$arrb[$b]['send_mobile'] .= ','.$v['send_mobile'];
$arrb[$b] = isset($arrb[$b])?$arrb[$b]:$v;
}
$arrb = array_values($arrb);
print_r($arrb);
?>