0
私は一日中これを試してきました! 一番上の多次元配列を一番下にどのように変換できますか?PHPで多次元配列を合理化する方法は?
Array (
[0] => Array ([id] => 34 [email] => [email protected])
[1] => Array ([id] => 34 [email] => [email protected])
[2] => Array ([id] => 33 [email] => [email protected])
[3] => Array ([id] => 33 [email] => [email protected])
[4] => Array ([id] => 33 [email] => [email protected])
)
Array (
[0]=>Array ([id] => 34 [email] => Array ([0]=> [email protected] [1]=>[email protected])
[1]=>Array ([id] => 33 [email] => Array ([0]=> [email protected] [1]=>[email protected] [2]=>[email protected])
)
多くのおかげです。
2番目のループがキーをドロップします。しかし、vasilwが言っているように、「IDを格納するためにキーを使う」というのは、私が質問したものよりも理にかなっていて、あなたの最初のループはそれを完全に作り出します。 (私は一度あなたの回答を投票することを覚えようと思います:-)ありがとうございます。 – DavidM