title: Send array with ajax request to php
body: <p>I created array like this <code>["9", "ques_5", "19", "ques_4"]</code>. Now I want to send it from JS to PHP but I'm not getting proper results. My JS code is:</p>
  
  <pre><code>$(".button").click(function(e) {
  
      e.preventDefault();
      $.ajax({
          type    : 'post', 
          cache   : false,
          url     : 'test/result.php',
          data    : {result : stuff},
          success: function(resp) {
              alert(resp);
          }
      });
  });
  </code></pre>
  
  <p>In the above code <code>stuff</code> is an array which contains records. How can I send this array with above code and then in PHP I want to process this array like <code>ques_5</code> is the key and <code>9</code> become the value for that key.</p>