我们来使用一个例子数组:
$array = array('Tiger' => 'Forest','Hippo' => 'River','Bird' => 'Sky');
是否有一个函数会将上述数组拆分为:
$array_keys = array('Tiger','Hippo','Bird'); $array_values = array('Forest','River','Sky');
$array = array('Tiger' => 'Forest','Hippo' => 'River','Bird' => 'Sky');
是否有一个函数会将上述数组拆分为:
$array_keys = array('Tiger','Hippo','Bird'); $array_values = array('Forest','River','Sky');
$array_keys = array_keys($array); $array_values = array_values($array);