i have this code for sending data
var test={imagename:"apple.jpg",x:"13",y:"33"};
$.ajax({
type: "POST",
url: "some.php",
data: test,
success: function(response){
console.log(response);
}
});
but now i want to send multiple data to php.My php side code is like this
print $_POST['imagename'];
i think of an approach like this
var test={imagename:"apple.jpg|hen.jpg",x:"13|44",y:"33|22"};
and on php getting $_POST['imagename'] then split it according to | but i am not liking semantic approach of it.
1-Does any one know better solution?
2-Please provide both javascript,jquery and php code for answer.
3-One final question is this notation called json var test={imagename:"apple.jpg",x:"13",y:"33"};
Thanks