I have a JSON
data about 150 users, i have convert that into java script array
, now what i want it to pass this array to PHP, So that i can perform further operations on this array.
var JSONString = '[{'user_id' : "1", "user_name" : "abc", "email":"abc@gmail.com"}, {"user_id":"2", "user_name":"abc", "email":"abc2@gmail.com"}]'
var JSONObject = JSON.parse(JSONString);
for (var key in JSONObject) {
if (JSONObject.hasOwnProperty(key)) {
console.log(JSONObject[key]["user_id"] + ", " + JSONObject[key]["user_name"]);
}
}
now what i need it to pass this array to PHP array variable , that will loop through and perform further operation. i have seen some solution that display it on html with JavaScript, but i don't need that. i need this array object in php array variable.