$data = Array ( ['key1'] => 1 , ['key2'] => 20 , ['key3'] => 11)
$key1 = Array (1 => "a" , 2 => "b")
$key2 = Array (1 => "a" , .... 20 => "y")
$key3 = Array (1 => "a" , .... 11 => "n")
替换 $data 数组中的所有值以返回的最简单方法是什么:
$data['key1'] = $key1[$data['key1']]
而不是一一做,即:
$data['key1'] = $key1[$data['key1']]
$data['key2'] = $key2[$data['key2']]...