I'm using this code for send my data to the server
ascarray = new Array();
for (var a in window.localStorage) {
var ascrray = ascarray.push(a, ":", window.localStorage[a]);
}
JSON.stringify(ascarray);
$(document).ready(function() {
$.ajax({
type: "POST",
url: 'myphp.php',
data: { objects : ascarray },
success: function(data) {
alert('the server returned ' + data);
}
});
});
And on server side i trying to get this request with
echo "I get param ".$_POST['objects'];
But server returned only this
the server returned I get param Array
How can i fix this? What i do wrong?