I am trying this code
$json = file_get_contents(\"http://www.google.com/alerts/preview?q=test&t=7&f=1&l=0&e\");
print_r(json_decode(utf8_enc
I solved adding another 'if' to manage objects in the 'utf8ize' function by @Konstantin (I've not used the other function) :
function utf8ize($mixed) {
if (is_array($mixed)) {
foreach ($mixed as $key => $value) {
$mixed[$key] = utf8ize($value);
}
} else if (is_string ($mixed)) {
return utf8_encode($mixed);
} else if (is_object($mixed)) {
$a = (array)$mixed; // from object to array
return utf8ize($a);
}
return $mixed;
}