php把数组的值转换成键
Converts the values of an array to the keys of it.
function values2keys($arr, $value=1){
$new = array();
while (list($k,$v) = each($arr)){
$v = trim($v);
if ($v != ''){
$new[$v] = $value;
}
}
return $new;
}
