title: PHP json_encode include brackets for arrays
body: <p>I am using <code>json_encode</code> to convert PHP arrays to json and it seems to work fine except for one thing.</p>
  
  <p>If I have a multi-dimensional array like this:</p>
  
  <pre><code>$person = array(
    'name' =&gt; 'John Smith',
    'age' =&gt; 36,
    'siblings' =&gt; array(
      'male' =&gt; array('John Doe','Mark'),
      'female' =&gt; array('Jane Doe','Jane Smith')
    )
  );
  </code></pre>
  
  <p>I want it to put brackets around <code>siblings</code> but it only does it around <code>male</code> and <code>female</code>, i.e:</p>
  
  <pre><code>{
    "name":"John Smith",
    "age":36,
    "siblings":{
      "male":[
        "John Doe",
        "Mark"
      ],
      "female":[
        "Jane Doe",
        "Jane Smith"
      ]
    }
  }
  </code></pre>
  
  <p>And I want <code>"siblings":[{ ... }]</code></p>
  
  <p>Is this possible?</p>