开发者

Get distinct values from an array using php

Does anybody know how to get the distinct values from an array usi开发者_如何学Gong PHP:

This is my MySQL query:

SELECT DISTINCT url_id, time_spent FROM library ORDER BY url_id


Not really sure which you want to do, the "distinct" should do it along with a group by in SQL.

But, if you want to somehow go through the data afterwards use array_unique.

Your question is unclear


Take a look at array_unique().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜