私は連想多次元配列があります。多次元連想配列の重複値を検出するにはどうすればよいですか?
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
私は結果を望んでいません。私はちょうど顧客が電子メールアドレスと同様に重複連絡先番号を持っているかどうか確認したい。これはフラグとして返されます - true は、この配列に冗長性が含まれていることを意味します –
*フラグとして返す* - すべてのアイテムに対して1つのフラグまたは各アイテムに対して別々にフラグを設定しますか? – RomanPerekhrest