json multiple arrays decode : <p>I have the following code:</p>

<pre><code>$json = ' {
    "HTML": 
        [
            {
              "id": 1,
              "name": "HTML",
              "match": false
            },
            {
              "id": 2,
              "name": "HTML 5",
              "match": false
            },
            {
              "id": 3,
              "name": "XHTML",
              "match": false
            }
        ]
}';

$obj = json_decode($json);
$obj[0][0]-&gt;name; // JavaScript: The Definitive Guide
</code></pre>

<p>Why do I get the following error? </p>

<blockquote>
  <p>use object of type stdClass as array</p>
</blockquote>

<p>I decode the json correctly, than I say that I want to pick the first object from the array (in this case HTML) and than I want to pick the name of the first one in the array.</p>

<p>What is going wrong?</p>
