Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • WOW, such quick replies... This is what is sent through the AJAX POST: {"d":[{"order":1},{"order":2},{"order":3},{"order":4},{"order":5}]} And using json_decode, the code below is what I have so far: $data = file_get_contents('php://input'); $data = json_decode(utf8_decode($data), true); foreach ( $data[d] as $key => $value ) { // $this->img_model->update_image_order($id , $order); } My main problem is getting my head round the arrays... Hopefully someone can point me in the right direction. Commented Apr 25, 2010 at 13:13