记录遇到问题的点点滴滴。
Get array values by keys
$array = array('a' => 1, 'b' => 3, 'c' => 5); $keys = array_flip(array('a', 'b')); $result = array_intersect_key($array, $keys); print_r($result);