結果からデータが取り込まれた 2 つの配列があります。
1) users_facebook & 2) users_twitter
Array
(
[users_facebook] => Array
(
[0] => Array
(
[id] => "180",
[email] => "",
[first_name] => "Djon",
[last_name] => "Katview"
),
[1] => Array
(
[id] => "182",
[email] => "",
[first_name] => "Awaaru",
[last_name] => "Bhejafry"
)
),
[users_twitter] => Array
(
[0] => Array
(
[id] => "180",
[email] => "",
[first_name] => "Djon",
[last_name] => "Katview"
),
[1] => Array
(
[id] => "181",
[email] => "",
[first_name] => "Kavritis",
[last_name] => "Abrfafda"
),
[2] => Array
(
[id] => "182",
[email] => "",
[first_name] => "Awaaru",
[last_name] => "Bhejafry"
)
),
)
両方の配列で同じ「id」を持つ要素を選択し、「users_final_array」のように新しい配列に追加したい
そして、それが新しい配列に追加されたら、両方の配列から削除したいと思います。
ps : 一致しない要素はそのままにしておく必要があります..ほぼ 3 時間以来、私はそれをいじっています
追加した:
結果配列は次のようになります。
Array
(
[users_facebook] => Array
(
),
[users_twitter] => Array
(
[0] => Array
(
[id] => "181",
[email] => "",
[first_name] => "Kavritis",
[last_name] => "Abrfafda"
)
),
[users_final_array] => Array
(
[0] => Array
(
[id] => "180",
[email] => "",
[first_name] => "Djon",
[last_name] => "Katview"
),
[1] => Array
(
[id] => "182",
[email] => "",
[first_name] => "Awaaru",
[last_name] => "Bhejafry"
)
),
)