title: how to get the value of array sent from AJAX POST in php?
body: <p>i am having a probelem with ajax multiple delete. I've sucessfully set the values of the checkbox slected in a variable.
  the problem i have to solve is how to get the value of the sent array in php.
  here is the ajax post code</p>
  
  <pre><code>&lt;script&gt;
      $("#delete-btn").click(function(e){
          e.preventDefault();
          var id = new Array();
          $(".check:checked").each(function() {
              id.push($(this).attr('value'));
  
          }); 
          $.post("../ajax/multiDelete.php",{id:id},function(data){
              alert(data);    
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>now, the php page</p>
  
  <pre><code>&lt;?php
  
  if(isset($_POST['id'])){
          $id = array($_POST['id']);
  
          foreach($id as $value){
                  echo $value;    
          }
      }
  
  ?&gt;
  </code></pre>
  
  <p>when the data is alerted, i only get "array";
  i do not know about JSON, so if there is anything i can do without it then your help is most appreciated! thanks : D</p>