title: json_encode() automatically converts array into object
body: <p>When I encode an array with <code>json_encode()</code> in <code>PHP</code>, all gets done right till here, but when I decode it back with <code>json_decode()</code>, it gives me <code>stdClass</code> Object instead of an Array.
  Here is my code:</p>
  
  <pre><code>echo $json=json_encode(array('a'=&gt;1,'b'=&gt;2));
  echo '&lt;br&gt;';
  print_r(json_decode($json));
  
  // and the result of PHP script is :
  {"a":1,"b":2}
  // stdClass Object ( [a] =&gt; 1 [b] =&gt; 2 )
  </code></pre>
  
  <p>what converts it into object from an array ??</p>
  
  <p>can i pass the json encoded string into url to get data on another page, or there exists any function that can do some url encoding ?</p>