php 二维数组转换为一维键值对数组

2024-12-21 22:53:50
推荐回答(1个)
回答1:

function transIndex($index, $Data) { $return = array(); foreach ($index as $key => $value) { $return[$value] = $Data[$key]; } return $return;}