im having trouble extracting the trend name and search query from the json response
$init = 'http://api.twitter.com/1/trends/1.json';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$init);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
$result = curl_exec($ch);
curl_close($ch);
$obj = json_decode($result);
foreach ($obj->trends as $trend) {
print $trend->query;
print $trend->name;
}