using PHP to create multidimensional array from simple JSON array

Posted by Michael Robinson on Stack Overflow See other posts from Stack Overflow or by Michael Robinson
Published on 2010-06-13T18:41:11Z Indexed on 2010/06/13 18:52 UTC
Read the original article Hit count: 377

Filed under:
|
|
|
|

I have a php query the returns the following JSON format from a table.

[{"memberid":"18", 
"useridFK":"30",
"loginName":"Johnson",
"name":"Frank",
"age":"23",
"place":"School",
},

It needs the following format:

[{"memberid":"18" {
                    "useridFK":"30",
                    "loginName":"Johnson",
                    "name":"Frank",
                    "age":"23",
                    "place":"School",}
                    },

I was told in another question that PHP would work and it looks like "Transversing" might be appropriate, I'm looking to find out what to put in the Php before it returns the JASON.

My Array.plist will look like the following:

  Root:                   Dictionary
       V Rows:            Array
         V Item 0:        Dictionary
            Title:        String          18
          V Children      Array
            V Item 0      Dictionary
              Title       String          30
   etc.

Thanks in advance.

© Stack Overflow or respective owner

Related posts about php

Related posts about iphone