我有一個關聯多維數組:如何檢測多維關聯數組中的重複值?
Array
(
[0] => Array
(
[customer_name] => John Dow
[customer_email] => [email protected]
[customer_mobile] => 1236547895
[birth_date] => 12/1/1996
[status] => Enable
)
[1] => Array
(
[customer_name] => Alex
[customer_email] => [email protected]
[customer_mobile] => 4563214785
[birth_date] => 19/1/1996
[status] => Enable
)
[2] => Array
(
[customer_name] => Arina
[customer_email] => [email protected]
[customer_mobile] => 963214785
[birth_date] => 25/1/1996
[status] => Enable
)
[3] => Array
(
[customer_name] => Atom
[customer_email] => [email protected]
[customer_mobile] => 5214789632
[birth_date] => 12/1/1998
[status] => Enable
)
[4] => Array
(
[customer_name] => Jennifer
[customer_email] => [email protected]
[customer_mobile] => 4563214785
[birth_date] => 12/2/1996
[status] => Enable
)
)
現在我想從對方customer_mobile
和customer_email
檢查相似值,以減少冗餘。聯繫電話和電子郵件地址必須是非冗餘的。
那麼請指導我,我該如何實現這一目標?謝謝:)
發佈預期結果 – RomanPerekhrest
我不想要任何結果。我只是想檢查是否有客戶有重複的聯繫電話以及電子郵件地址。它返回爲標誌 - 真 意味着這個數組包含冗餘 –
你寫*它作爲標誌返回* - 一個標誌爲所有項目或分別爲每個項目? – RomanPerekhrest