[Solved] How to remove array index from json object while convert array to jsonobject php? [closed]
First of all, I need to change your code to this to even get the result you’re talking about: $arr = array(‘id’ => $_POST[‘id’], ‘name’ => $_POST[‘name’], ‘model’ => $_POST[‘model’], ‘color’ => $_POST[‘color’]); $result = json_encode(array(‘success’ => 1, ‘message’ => “Updated Successfully”, $arr)); echo $result; The problem you are facing with the key “0” is … Read more