我有一个数组 $history:
Array (
Array ([id] => 1, [created] => 2012-12-20 22:40, [message] => 'Message1 to display here'),
Array ([id] => 2, [created] => 2012-12-20 22:40, [message] => 'Message2 to display here'),
Array ([id] => 3, [created] => 2012-12-20 22:40, [message] => 'Message3 to display here'),
Array ([id] => 4, [created] => 2012-12-20 21:30, [message] => 'Message4 to display here'),
Array ([id] => 5, [created] => 2012-12-20 21:30, [message] => 'Message5 to display here'),
Array ([id] => 6, [created] => 2012-12-20 20:20, [message] => 'Message6 to display here'),
);
我想显示按日期 [创建] 字段分组的消息 [消息]。
喜欢
2012-12-20 22:40
======================
Message1
Message2
Message3
2012-12-20 21:30
======================
Message4
Message5
我知道有一个函数 array_count_values() 可以提供帮助。