Php 数组_unique错误地丢弃值
我试图使用array_unique来丢弃重复的值Php 数组_unique错误地丢弃值,php,array-unique,Php,Array Unique,我试图使用array_unique来丢弃重复的值 Array ( [0] => Array ( [book_id] => 1203910329 [author] => Gauci, Joe [description] => Paperback. Very Good. [isbn] => 9781907374067 [publ
Array
(
[0] => Array
(
[book_id] => 1203910329
[author] => Gauci, Joe
[description] => Paperback. Very Good.
[isbn] => 9781907374067
[publisher] =>
[date] =>
[currency] => USD
[price] => 10.97
[bookseller] => xx
[bookseller_location] => GBR
[condition] => 3
[shipping_ground] => 4.73
[shipping_expedited] => 6.33
)
[1] => Array
(
[book_id] => 12312314556
[author] => Gauci, Joe
[description] => Paperback. GOOD.
[isbn] => 9781907374067
[publisher] =>
[date] =>
[currency] => USD
[price] => 1.84
[bookseller] => xx
[bookseller_location] => GBR
[condition] => 2.5
[shipping_ground] => 4.73
[shipping_expedited] => 6.33
)
[2] => Array
(
[book_id] => 12312314556
[author] => Gauci, Joe
[description] => Paperback. GOOD.
[isbn] => 9781907374067
[publisher] =>
[date] =>
[currency] => USD
[price] => 1.84
[bookseller] => xx
[bookseller_location] => GBR
[condition] => 2.5
[shipping_ground] => 4.73
[shipping_expedited] => 6.33
)
)
每次使用array\u unique($results)
时,只返回第一个值
Array
(
[0] => Array
(
[book_id] => 1203910329
[author] => Gauci, Joe
[description] => Paperback. Very Good.
[isbn] => 9781907374067
[publisher] =>
[date] =>
[currency] => USD
[price] => 10.97
[bookseller] => xx
[bookseller_location] => GBR
[condition] => 3
[shipping_ground] => 4.73
[shipping_expedited] => 6.33
)
)
使用array\u unique
?你不能使用嵌套数组。使用的比较清楚地记录在案:
(string)$elem1==(string)$elem2
不能与嵌套数组一起使用。使用的比较清楚地记录在案:
(string)$elem1==(string)$elem2
不能与嵌套数组一起使用。使用的比较清楚地记录在案:
(string)$elem1==(string)$elem2
不能与嵌套数组一起使用。使用的比较清楚地记录在案:
(string)$elem1==(string)$elem2
你的数据源是什么?你的数据源是什么?你的数据源是什么?