title: Sending array via Ajax fails
body: <pre><code>var labels = new Array();
  
  &lt;?php foreach($crud_data as $cd ) { ?&gt;
    labels['&lt;?php echo $cd['name'] ; ?&gt;'] = '&lt;?php echo $cd['label'] ; ?&gt;';
  &lt;?php } ?&gt;
  
  $.post('url.php' , { labels:labels} );
  </code></pre>
  
  <p>Why can I not send <code>labels</code> array like this? It doesn't show anything in Firebug. </p>
  
  <p>My <code>console.log(labels)</code> result:</p>
  
  <pre><code>[]
  
  avatar
  "avatar"
  
  email
  "email"
  
  id
  "id"
  
  name
  "name"
  
  password
  "password"
  </code></pre>
  
  <p>if i populate array like this</p>
  
  <pre><code>&lt;?php foreach($crud_data as $cd ) { ?&gt;
    labels.push('&lt;?php echo $cd['label'] ; ?&gt;');
  &lt;?php } ?&gt;
  
  $.post('url.php' , { labels:labels} );
  </code></pre>
  
  <p>it works fine !</p>