I have a form that would pass ids of some items to ajax
and i need to update all the rows with those arrays with the updated datas.
I have to use ajax
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
foreach($items as $item){
$item_arr[]=$item['id']
}
and I pass the array to an input field to fetch to ajax
<input type="hidden" id="myid" value="<?php echo json_encode($item_arr); ?>"/>
and
$myid=$("#myid").val();
$.ajax({
url:"myurl.php",
data:{myid:myid},
})
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