$merged = array();
while($row = mysqli_fetch_assoc($get_data_res)){
$merged[] = $row;
}
echo '<pre>'; print_r($merged); echo '</pre>';
打印数组后我得到了这个输出
Array
(
[0] => Array
(
[lees_than_60] => 50
[one_four] => 48
[four_min] => 0
[id] => 24
[first_name] => Yogini
[log_in_time] => 0000-00-00 00:00:00
[log_out_time] => 0000-00-00 00:00:00
[calldate] => 2014-05-22
[clid] => 2433
)
[1] => Array
(
[lees_than_60] => 14
[one_four] => 6
[four_min] => 2
[id] => 28
[first_name] => Vijay
[log_in_time] => 2014-05-28 16:57:51
[log_out_time] => 2014-05-28 16:58:12
[calldate] => 2014-05-22
[clid] => 2436
)
[2] => Array
(
[lees_than_60] => 64
[one_four] => 60
[four_min] => 0
[id] => 23
[first_name] => Pratibha
[log_in_time] => 2014-05-28 15:55:18
[log_out_time] => 2014-05-28 15:55:44
[calldate] => 2014-05-22
[clid] => 2431
)
)
我的问题是我想创建下面的数组,就像我想要创建针对相同calldate 2014-05-22的新数组,即只有一个calldate并保留所有数据,如:
[calldate] =&gt; 2014年5月22日
显示aove通话日期的整个数据不应重复合并