配列#1は次のようになります(簡略化):
Array
(
[Appetizers] => Array
(
[0] => Array
(
[category] => Appetizers
[name] => Beef Tenderloin Carpaccio
)
[1] => Array
(
[category] => Appetizers
[name] => Calamari Fritto Misto
)
)
[Flatbreads] => Array
(
[0] => Array
(
[category] => Flatbreads
[name] => Quattro Formaggi
)
[1] => Array
(
[category] => Flatbreads
[name] => Tomato & Burrata
)
)
)
アレイ#2は次のようになります。
Array
(
[0] => Array
(
[category] => Appetizers
[note] => Choose One Item From Each Category
)
[1] => Array
(
[category] => Flatbreads
[note] => with Shoestring or Wedge Potatoes
)
)
配列#1のカテゴリKEYと配列#2の'カテゴリ'VALUEの一致に基づいて、['note']を配列#2から配列#1にマージするにはどうすればよいですか?したがって、結果は次のようになります。
Array
(
[Appetizers] => Array
(
[0] => Array
(
[category] => Appetizers
[name] => Beef Tenderloin Carpaccio
[note] => Choose One Item From Each Category
)
[1] => Array
(
[category] => Appetizers
[name] => Calamari Fritto Misto
[note] => Choose One Item From Each Category
)
)
[Flatbreads] => Array
(
[0] => Array
(
[category] => Flatbreads
[name] => Quattro Formaggi
[note] => with Shoestring or Wedge Potatoes
)
[1] => Array
(
[category] => Flatbreads
[name] => Tomato & Burrata
[note] => with Shoestring or Wedge Potatoes
)
)
)