php怎么把数组value里面等于号(=)变为key?

2024-12-21 16:47:35
推荐回答(2个)
回答1:

array_map()吧,你估计会舍弃它

回答2:

$output = array();

foreach ($array as $data) {
$arr = explode('=',$data);
$output[$arr[0]] = $arr[1];
}