I have looked and can't quite come up with an answer to this question. I currently have an array which I call dataArray. The dataArray contains 2 keys (name, value) and is set up like this:dataArray.push({name : file.name, value : this.result});
I am passing this array to my PHP file using the .post() method like so:$.post('upload.php', dataArray[index], function(data) {}
.
Then in the upload.php file I retrieve the data using:
$file = $_POST['value'];
$name = $_POST['name'];
This works fine for what I need. My question is how do I pass and retrieve 2 separate arrays. I have another array called 'position' that I would also like to send using the .post() method. This array is set up like so:position.push({left : 0, top : 0});
I can't seem to find a way to pass them both at the same time.