Access an array value within an object in PHP -


i'm new php , trying access value of "contactid" following:

object(stdclass)#2 (4) {      ["contacts"]=> array(1) {          [0]=> object(stdclass)#3 (18) {               ["email"]=> string(24) "joewilliams@icontact.com"              ["firstname"]=> string(3) "joe"              ["lastname"]=> string(8) "williams"              ["prefix"]=> string(3) "mr."              ["suffix"]=> string(3) "jr."              ["fax"]=> string(0) ""              ["phone"]=> string(10) "8668039462"              ["street"]=> string(21) "2365 meridian parkway"              ["street2"]=> string(0) ""              ["city"]=> string(6) "durham"              ["state"]=> string(2) "nc"              ["postalcode"]=> string(5) "27713"              ["createdate"]=> string(19) "2013-03-30 21:22:28"              ["status"]=> string(6) "normal"              ["bouncecount"]=> null              ["contactid"]=> string(8) "67295434"          }      }      ["limit"]=> int(20)      ["offset"]=> int(0)      ["total"]=> int(1)  }  

how can retrieve value of contactid?

many thanks!

these not arrays, object containing array containing object. php object access syntax ->

$variablename->contacts[0]->contactid 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -