How can I check and remove duplicates from the array based on ProductReference
?
This is my array:
Array
(
[0] => Array
(
[Order] => 1
[Name] => pro book 40X80
[ProductReference] => FM7291
[Description] => pro book
[Product_type] => photobook
[Pages] => 20
[AdicRange] => 2
[Width] => 40
[Height] => 40
[AvailableOption] => 0
[PicPreviews] => Array
(
[PicPreview] => Array
(
[UrlOriginal] => http://dnmyog93u35ow.cloudfront.net/assets/software/xl_1491302876209.png
[UrlThumb] => http://dnmyog93u35ow.cloudfront.net/assets/software/xs_1491302876209.png
)
)
[SubCategories] => Array
(
)
)
[1] => Array
(
[Order] => 1
[Name] => pro book 40X80
[ProductReference] => FM7291
[Description] => pro book
[Product_type] => photobook
[Pages] => 20
[AdicRange] => 2
[Width] => 40
[Height] => 40
[AvailableOption] => 0
[PicPreviews] => Array
(
[PicPreview] => Array
(
[UrlOriginal] => http://dnmyog93u35ow.cloudfront.net/assets/software/xl_1491302876209.png
[UrlThumb] => http://dnmyog93u35ow.cloudfront.net/assets/software/xs_1491302876209.png
)
)
[SubCategories] => Array
(
)
)
[2] => Array
(
[Order] => 2
[Name] => 21X29 booklet Ver
[ProductReference] => DF0754(A4)
[Description] => 29X21 booklet Ver
[Product_type] => photobook
[Pages] => 24
[AdicRange] => 4
[Width] => 20.3
[Height] => 29.9
[AvailableOption] => 0
[PicPreviews] => Array
(
[PicPreview] => Array
(
[UrlOriginal] => http://dnmyog93u35ow.cloudfront.net/assets/software/xl_1495636546424.jpg
[UrlThumb] => http://dnmyog93u35ow.cloudfront.net/assets/software/xs_1495636546424.jpg
)
)
[SubCategories] => Array
(
)
)
)