json在php中解析响应

I am getting NULL for all my JSON data here is my code

$jsons1 = file_get_contents($api_url); // returns JSON
        $jsons=json_decode($jsons1);

        foreach ($jsons as $json)
        {
        echo "
";
        echo "<ul>";
        echo "<li>";
        echo "
Title : ".$json->title."
";
        echo "
Content: ".$json->content."
";
        echo "</li>";
        echo "</ul>";
        }

I am unable to fetch it like $json->title, Am i missing something?

The output is

 - Title : Content: 

Please help in this regard

here is output of $jsons1 variable

{"results":[{"title": "Temp, Russia - Wikipedia, the free encyclopedia","kwic": "Coordinates : 52°03′N 39°44′E  /  52.05°N 39.733°E  / 52.05; 39.733  tenmp ( Russian : УÑмань ) is a town and the administrative center of ...","content": "","url": "http://en.wikipedia.org/wiki/sdfds,_Russia","iurl": "","domain": "en.wikipedia.org","author": "","news": false,"votes": "1","date": 1357744155518,"related":[]}],"query": "tenp","suggestions":[],"count":96,"start":1,"length":10,"time": "412"}

You have object results containing your datas..

So you have just to fix your Foreach statement ..>

    foreach ($jsons->results as $json) { ... }

Try as

$j = '{"results":[{"title": "Temp, Russia - Wikipedia, the free encyclopedia","kwic": "Coordinates : 52°03′N 39°44′E  /  52.05°N 39.733°E  / 52.05; 39.733  tenmp ( Russian : УÑмань ) is a town and the administrative center of ...","content": "","url": "http://en.wikipedia.org/wiki/sdfds,_Russia","iurl": "","domain": "en.wikipedia.org","author": "","news": false,"votes": "1","date": 1357744155518,"related":[]}],"query": "tenp","suggestions":[],"count":96,"start":1,"length":10,"time": "412"}';

$data = json_decode($j,true);

foreach ($data["results"] as $key=>$val){
    echo "
";
    echo "<ul>";
    echo "<li>";
    echo "
Title : ".$val["title"]."
";
    echo "
Content: ".$val["content"]."
";
    echo "</li>";
    echo "</ul>";
}

Right now there is only one data in results element so looping is better if there are more.