function keyprefix($keyprefix, Array $array) {
foreach($array as $k=>$v){
$array[$keyprefix.$k] = $v;
unset($array[$k]);
}
return $array;
}
Using array_flip will not preserve empty or null values.
Additional code could be added in the unlikely event that the prefixed key already exists.