title: How to pass array through ajax to a php file?
body: <p>I have a form that would pass ids of some items to <code>ajax</code>  and i need to update all the rows with those arrays with the updated datas.
  I have to use <code>ajax</code> to accomplish this.
  The ids are generated through mysql queries and I passed it to an array.
  So it is already an array and how do i change to javascript-processable(if that's a word) data and change it back to php array.
  Here's my code
  this is how to make the array</p>
  
  <pre><code>foreach($items as $item){
      $item_arr[]=$item['id']
  }
  </code></pre>
  
  <p>and I pass the array to an input field to fetch to ajax</p>
  
  <pre><code>&lt;input type="hidden" id="myid" value="&lt;?php echo json_encode($item_arr); ?&gt;"/&gt;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>    $myid=$("#myid").val();
      $.ajax({
      url:"myurl.php",
      data:{myid:myid},
  })
  </code></pre>
  
  <p>this is returning I don't know what!!Please help
  this is my first try with this kind of conversion of array..Please bear with me</p>