title: Send array with Ajax to PHP script
body: <p>I have array made by function <strong>.push</strong>. In array is very large data. How is the best way send this to PHP script?</p>
  
  <pre><code>   dataString = ??? ; // array?
     $.ajax({
          type: "POST",
          url: "script.php",
          data: dataString, 
          cache: false,
  
          success: function(){
              alert("OK");
          }
      });
  </code></pre>
  
  <p>script.php:</p>
  
  <pre><code>  $data = $_POST['data'];
  
    // here i would like use foreach:
  
    foreach($data as $d){
       echo $d;
    }
  </code></pre>
  
  <p>How is the best way for this?</p>