Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Moving an array key to the top

Name: Anonymous 2013-11-27 3:25

I have a set of array:

{
    "comments": [
        {
            "user_id": "44",
            "comment": "what"
        }
    ],
    "item_id": "3"
}


Is it possible to move "item_id" key to the above "comments" array?

Here is my code in php: https://www.refheap.com/21279

Name: Anonymous 2013-11-27 11:01

fuck off

Name: Anonymous 2013-11-27 22:34

$response_arr = array('item_id' => $response_arr['item_id']) + $response_arr;

This should handle it... But you should probably be asking yourself why you are doing something which makes the ordering of elements in an associative array important.

Name: Anonymous 2013-11-27 22:47

HAHAHA SHIT LANGUAGE

Name: Anonymous 2013-11-28 1:11

>>2
>le pedophile sage

>>4
>le pedophile sage

Name: Anonymous 2013-11-28 11:34

>─────▄████▀█▄
   >───▄█████████████████▄
   >─▄█████.▼.▼.▼.▼.▼.▼▼▼▼
   >▄███████▄.▲.▲▲▲▲▲▲▲▲
   >███████████████████▀▀
   YOU HAVE BEEN CAUGHT BY THE GATOR OF DOOM! REPOST THIS 5 TIMES OR GET GATORED!!!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List