-2
我有一個這樣的數組:如何摺疊數組?
0 => array:8 [▼
"_id" => MongoId {#266 ▶}
"name" => "New param"
"default" => "900"
"visibility" => "1"
"type" => 1
"only_numbers" => "1"
"value" => "900"
"available" => "1"
]
如何摺疊此數組:
$arr["New param"] = "900";
只有爲:
$arr = array(
$a["name"] => $a["value"]
);
你給了自己一個答案。那麼我們該怎麼辦? –
也許你可以推薦功能或更優雅的解決方案 – Blablacar
你的解決方案有什麼問題? –