I get channel json information from the youtube api v2 with following code:
$json = json_decode(file_get_contents("http://gdata.youtube.com/feeds/api/users/lefloid?alt=json"),true);
And then try to get the author name
echo $json["entry"]["author"][0]["name"]["$t"];
But this code doesnt work so I try find the problem.
$json = json_decode(file_get_contents("http://gdata.youtube.com/feeds/api/users/lefloid?alt=json"),true)["entry"]["author"][0]["name"];
echo "<pre>";
print_r($json);
echo "</pre>";
output:
Array([$t] => LeFloid)
but the echo after this code doesnt work
echo $json["$t"];
How can I get finally the author name?