functionarrayRecursive_o(&$array, $function, $apply_to_keys_also = false)
{
foreach($array as $key => $value) {
if(is_array($value)) {
$this->arrayRecursive_o($array->$key, $function, $apply_to_keys_also);
} else{
$array->$key = $function($value);
}
if($apply_to_keys_also&& is_string($key)) {
$new_key= $function($key);
if($new_key != $key) {
$array->$new_key = $array->$key;
unset( $array->$key);
}
}
}
}
function JSON_o($array) {
$this->arrayRecursive_o($array, 'urlencode', true);
$json= json_encode($array);
returnurldecode($json);
}