私のプロジェクトでは、次のような配列がありました。解決策を見つけるのを手伝ってください。以下に配列を示しますので、参考にしてください。FOLLOWINGのようです。
[0] => Array
(
[Notification] => Array
(
[id] => 135
[notification_date] => 2013-09-18
[short_desc] => dsfdfdfdf
[long_desc] =>
)
[NotificationProduct] => Array
(
[0] => Array
(
[id] => 41
[notification_id] => 135
[product_id] => 20
[Product] => Array
(
[id] => 20
[category_id] => 2
[name] => asasasa
)
)
[1] => Array
(
[id] => 42
[notification_id] => 135
[product_id] => 21
[Product] => Array
(
[id] => 21
[category_id] => 2
[name] => corn flakcf
)
)
)
)
私は上記の種類の配列を持っています.今、私はそれを次の方法に変換したいと思います:
[0] => Array
(
[Notification] => Array
(
[id] => 135
[notification_date] => 2013-09-18
[short_desc] => dsfdfdfdf
[long_desc] =>
)
[NotificationProduct] => Array
(
[0] => Array
(
[id] => 41
[notification_id] => 135
[product_id] => 20
[name] => asasasa
)
[1] => Array
(
[id] => 42
[notification_id] => 135
[product_id] => 21
[name] => corn flakcf
)
)
)
Is there any way to convert it into that kind of array.
ありがとう!