0

Hi I am trying to access the date string in the following nested object.

["studyDate"]=>
    object(Date)#55 (1) {
      ["date"]=>
      object(DateTime)#58 (3) {
        ["date"]=>
        string(26) "2013-05-31 14:43:00.000000"
        ["timezone_type"]=>
        int(3)
        ["timezone"]=>
        string(16) "America/New_York"
      }
    }

This is being returned in a $previousExam variable, so I am trying. $previousExam{0}->study_date->date

This gives me:

2016-06-08 10:27:45 object(DateTime)#163 (3) {
  ["date"]=>
  string(26) "2016-06-07 14:41:00.000000"
  ["timezone_type"]=>
  int(3)
  ["timezone"]=>
  string(16) "America/New_York"
}

This is where i am stuck. Trying $previousExam{0}->study_date->date->date returns NULL. Any help is appreciated.

Danny Sullivan
  • 277
  • 2
  • 12

0 Answers0