Page 1 of 1

how do I get ID from this array?

Posted: Wed Apr 06, 2011 3:22 pm
by someguyhere

Code: Select all

Array
(
    [0] => stdClass Object
        (
            [ID] => 115
        )

)

Re: how do I get ID from this array?

Posted: Wed Apr 06, 2011 4:38 pm
by social_experiment
$array[0]['ID'] ?

Re: how do I get ID from this array?

Posted: Wed Apr 06, 2011 8:39 pm
by fugix
should be as social_experiment said...the $array will be whatever variable that your array is stored under

Re: how do I get ID from this array?

Posted: Thu Apr 07, 2011 8:36 am
by someguyhere
I did try that earlier, but it didn't work. I can't remember the error it gave me.

I ended up finding a way to pull the data in a way that created a more straight forward array that was easier to work with.