$tmp["updaterId"] = $update["updaterId"]; $tmp["updaterName"] = $update["username"]; $tmp["likeCount"] = $update["likeCount"]; $tmp["dislikeCount"] = $update["dislikeCount"]; $tmp["requestId"] = $update["requestId"]; $tmp["timeOfUpdate"] = $update["timeOfUpdate"]; array_push($response["updates"], $tmp); $likers = $db->getUpdateLikers($update); while ($liker = $likers->fetch_assoc()) { $tmp2 = array(); $tmp2["likerName"] = $liker["likerName"]; $tmp2["likerId"] = $liker["likerId"]; // array_push($response["updates"]["likers"], $tmp2); array_push($response["updates"], $tmp2); } $dislikers = $db->getUpdateDislikers($update); while ($disliker = $dislikers->fetch_assoc()) { $tmp3 = array(); $tmp3["dislikerName"] = $disliker["dislikerName"]; $tmp3["dislikerId"] = $disliker["dislikerId"]; // array_push($response["updates"]["likers"], $tmp2); array_push($response["updates"], $tmp3); } // $comments = $db->getUpdateComments($updateId); // while ($comment = $comments->fetch_assoc()) { // $tmp = array(); // $tmp["commentId"] = $comment["id"]; // $tmp["updateId"] = $comment["updateId"]; // $tmp["commenterId"] = $comment["commenterId"]; // $tmp["commenterName"] = $comment["commenterName"]; // $tmp["commentText"] = $comment["commentText"];