この配列を考えると:
Array
(
[0] => Array
(
[title] => this is the newest post
[ssm_featured_post_id] => 70
)
[1] => Array
(
[title] => sdfsfsdf
[ssm_featured_post_id] => 63
)
[2] => Array
(
[title] => test
[ssm_featured_post_id] => 49
)
[3] => Array
(
[title] => Hello world!
[ssm_featured_post_id] => 1
)
)
別の同様の配列を新しい値とマージする最も簡単な方法は何ですか?
2 番目の配列には、新しい項目または削除された項目が含まれる場合があります。
最初の配列のアイテムの順序を維持し、新しいアイテムを最後に追加し、新しい配列にないアイテムを削除したい
Array
(
[0] => Array
(
[title] => sdfsfsdf
[ssm_featured_post_id] => 63
)
[1] => Array
(
[title] => this is the newest post
[ssm_featured_post_id] => 70
)
[2] => Array
(
[title] => test
[ssm_featured_post_id] => 49
)
[3] => Array
(
[title] => Hello world!
[ssm_featured_post_id] => 1
)
[4] => Array
(
[title] => awesome post
[ssm_featured_post_id] => 73
)
)