title: Is there a PHP function to convert a query string to an array?
body: <p>I'm basically looking for the opposite of <code>http_build_query()</code>.</p>
  
  <p>I have the following as a string:</p>
  
  <pre><code>foo=bar&amp;bar[var]=foo
  </code></pre>
  
  <p>And I want the following (to pass into <code>http_build_query</code>):</p>
  
  <pre><code>array(
      'foo' =&gt; 'bar',
      'bar' =&gt; array(
           'var' =&gt; 'foo',
      )
  )
  </code></pre>