How to read this array?

Discussion in 'PHP' started by 123GoToAndPlay, Aug 16, 2007.

  1. #1
    I am getting this array with JSON

    
    Array ( [0] => stdClass Object ( [Name] => AFRIKA [Description] => Afrika ) [1] => stdClass Object ( [Name] => ALASKA [Description] => Alaska ) [2] => stdClass Object ( [Name] => ALBANIE [Description] => Albanie ) [3] => stdClass Object ( [Name] => ALGERIJE [Description] => Algerije ) [4] => stdClass Object ( [Name] => ANDORRA [Description] => Andorra ) )
    
    Code (markup):
    how do i read this one out?

    regards
     
    123GoToAndPlay, Aug 16, 2007 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    It's an array made up of objects so you wont be able to use it like a normal array.

    What exactly are you trying to do with it?
     
    jestep, Aug 16, 2007 IP
  3. ehlokoen

    ehlokoen Peon

    Messages:
    161
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You would do like $yourarrayname->variablename;
     
    ehlokoen, Aug 16, 2007 IP