php - Access Object within Object -


how access, say, title? have tried $response->element->element1->title null return.

array(1) { ["element"]=> object(stdclass)#10 (3) { ["element1"]=> object(stdclass)#11 (2) {   ["title"]=>   string(16) "test"   ["addresses"]=>   object(stdclass)#12 (1) {     ["address"]=>     object(stdclass)#13 (2) {       ["lines"]=>       object(stdclass)#14 (1) {         ["line1"]=>         string(17) "test loc"       }       ["postcode"]=>       string(7) "postcode"     }   } 

try one: element not object

$response['element']->element1->title; 

Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -