It is packing up the elements as an array:
"title": [
"No Battery Required for This Wireless Device",
{
"type": "html",
"content": "No Battery Required for This Wireless Device"
}
],
You can read the first element like this:
<?php
$url = 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20feed%20where%20url=%22http://feeds.feedburner.com/DiscoveryNews-Top-Stories%22&format=json&diagnostics=true&callback=cbfunc';
$data = substr(file_get_contents($url), 7, -2);
$json = json_decode($data);
foreach ($json->query->results->item as $item)
{
echo "Title: ", $item->title[0], "\nDescription: ", $item->description[0], "\n";
echo "==================================================\n\n";
}
Or using SimpleXML library:
$url = 'http://feeds.feedburner.com/DiscoveryNews-Top-Stories?format=xml';
$xml = simplexml_load_string(file_get_contents($url));
foreach ($xml->channel->item as $item)
{
echo "Title: ", $item->title, "\nDescription: ", $item->description, "\n";
echo "==================================================\n\n";
}