News新闻

业界新闻动态、技术前沿
Who are we?

您的位置:首页      乐道系统FAQ      PHP 实现浏览记录并按日期分组

PHP 实现浏览记录并按日期分组

发布日期:2017-05-11 00:00:00 54

现有测试数据如下,要求实现如下图中的效果:

array(4) {
 [0] => array(6) {
 ["visit_id"] => int(127)
 ["goods_id"] => int(16)
 ["visittime"] => int(1494399935)
 ["goods_name"] => string(53) "OPPO R9s 全网通4G+64G 双卡双待手机 玫瑰金"
 ["shop_price"] => string(6) "500.00"
 }
 [1] => array(6) {
 ["visit_id"] => int(124)
 ["goods_id"] => int(13)
 ["visittime"] => int(1494399921)
 ["goods_name"] => string(76) "SIEMENS/西门子 KA92NV09TI双开门家用对开门电冰箱变频旗舰款"
 ["shop_price"] => string(7) "4000.00"
 }
 [2] => array(6) {
 ["visit_id"] => int(123)
 ["goods_id"] => int(27)
 ["visittime"] => int(1494399903)
 ["goods_name"] => string(85) "爱他美白金版Aptamil 幼儿配方奶粉3段(12-36个月适用)900g(欧洲进口)"
 ["shop_price"] => string(6) "329.00"
 }
 [3] => array(6) {
 ["visit_id"] => int(120)
 ["goods_id"] => int(26)
 ["visittime"] => int(1494224263)
 ["goods_name"] => string(21) "欢乐谷免票一张"
 ["shop_price"] => string(5) "50.00"
 }
}