title: PHP: IDX api - Passing parameters in the query string
body: <p>I'm working with the IDX api. I want to create pages by using the following query:</p>
  
  <pre><code>'queryString' =&gt; array(
    'idxID' =&gt; 'a01',
    'pt' =&gt; '1',
    'a_subdivisionName' =&gt; array('SUN_CITY_LAS_VEGAS')
  )
  </code></pre>
  
  <p>The desired result is to create a page for the subdivision name 'SUN_CITY_LAS_VEGAS'.</p>
  
  <p>on dumping the result, this is the output:</p>
  
  <pre><code>["queryString"]=&gt;
  string(73) "page=listings&amp;idxID=a01&amp;pt=1&amp;a_subdivisionName%5B0%5D=SUN_CITY_LAS_VEGAS"
  </code></pre>
  
  <p>but what i expect is this:</p>
  
  <pre><code>["queryString"]=&gt;
  string(73) "page=listings&amp;idxID=a015&amp;pt=1&amp;a_subdivisionName[]=SUN_CITY_LAS_VEGAS"
  </code></pre>
  
  <p>seems i'm not getting it right here:</p>
  
  <pre><code>'a_subdivisionName' =&gt;array('SUN_CITY_LAS_VEGAS')
  </code></pre>
  
  <p>resulting in</p>
  
  <pre><code>a_subdivisionName%5B0%5D=SUN_CITY_LAS_VEGAS
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>a_subdivisionName[]=SUN_CITY_LAS_VEGAS
  </code></pre>
  
  <p>What am i missing?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Here's how I'm building the url:</p>
  
  <pre><code>$data = array(
    'linkName' =&gt; 'SUN_CITY_LAS_VEGAS',
    'pageTitle' =&gt; 'SUN_CITY_LAS_VEGAS',
    'linkTitle' =&gt; 'SUN_CITY_LAS_VEGAS',
    'queryString' =&gt; array(
      'idxID' =&gt; 'a01',
      'pt' =&gt; '1',
      'a_subdivisionName' =&gt; array('SUN_CITY_LAS_VEGAS')
    )
  );
  
  $data = http_build_query($data);
  </code></pre>
  
  <p>Then i pass it to curl in a PUT request as follows:</p>
  
  <pre><code>curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
  </code></pre>