title: PHP array to json without indices
body: <p>I am new to PHP and I am trying to convert an array to json, without the indices.</p>
  
  <p>For an example, I have:</p>
  
  <pre><code>[{"name":"Dean"},{"last_name":"Don"},{"age":31},{"height":181}]
  </code></pre>
  
  <p>I need it to be a single json object:</p>
  
  <pre><code>{
  "name":"Dean,
  "last_name":"Don",
  "age":31,
  "height":181
  }
  </code></pre>
  
  <p>I tried using <code>json_encode()</code> but all I get is not correct, I event tried specifying
  <code>JSON_FORCE_OBJECT</code>, which put the indices, which I don't want.</p>
  
  <p>Anyone has an idea how to solve it?
  Thank you</p>