私はここで再投稿したり冗長になったりせず、まだphp配列を増やしていることを願っています。私は次のような多次元配列を持っています:
Array
(
[0] => stdClass Object
(
[field_name] => step_one
[field_value] => A Message
)
[1] => stdClass Object
(
[field_name] => message_color
[field_value] =>
)
[2] => stdClass Object
(
[field_name] => Submitted Login
[field_value] => admin
)
[3] => stdClass Object
(
[field_name] => Submitted From
[field_value] => 127.0.0.1
)
[4] => stdClass Object
(
[field_name] => step_one
[field_value] => Another Message
)
[5] => stdClass Object
(
[field_name] => message_color
[field_value] => orange
)
[6] => stdClass Object
(
[field_name] => Submitted Login
[field_value] => admin
)
[7] => stdClass Object
(
[field_name] => Submitted From
[field_value] => 127.0.0.1
)
[8] => stdClass Object
(
[field_name] => step_one
[field_value] => some Other Idea
)
[9] => stdClass Object
(
[field_name] => message_color
[field_value] => pink
)
[10] => stdClass Object
(
[field_name] => Submitted Login
[field_value] => admin
)
[11] => stdClass Object
(
[field_name] => Submitted From
[field_value] => 127.0.0.1
)
)そして私はそれをこのように読んで欲しい:
Array(
Array [0] (
[step_one] => Message
[message_color] =>
)
Array [1] (
[step_one] => Another Message
[message_color] => orange
)
Array [2] (
[step_one] => some other idea
[message_color] => pink
)
しかし、PHPでそこに到達する方法がわかりません。array_merge()とarray_combine()を試しましたが、どこにも行きません。どんな助けでも大歓迎です!