function atm_utf8_decode_callback(&$input, $index = '') { if (is_string($input)) { //decode UTF8 with support of CP1252 $input = io::utf8Decode($input); return $input; } elseif (is_array($input)) { array_walk_recursive($input, 'atm_utf8_decode_callback'); return $input; } return $input; }