Associative array passing as empty string
<p>I am trying to pass an array to PHP via Ajax, but the array is being passed as an empty string. This is my code when creating the array:</p>

<pre><code>var params = new Array();
var inputs = new Array();
inputs = $(":input");
$.each(inputs, function(key, value) {
  params[value.id] = value.value;
});

alert(params);
</code></pre>

<p>Before that there are around 20 inputs that look like this:</p>

<pre><code>&lt;input name="first_name" id="first_name" type="text" class="medium"/&gt;
&lt;input name="last_name" id="last_name" type="text" class="medium"/&gt;
</code></pre>

<p>The <code>alert(params)</code> is just giving me an empty string. However, <code>alert(params['first_name'])</code> actually gives me the <code>first_name</code> input value.</p>

<p>Why isn't the array going through?</p>
