0

I have an array as follows, and now I need to retrieve the date value from DateTime Object using PHP.

Array(
[0] => DateTime Object
    (
        [date] => 2013-08-12 00:00:00
        [timezone_type] => 3
        [timezone] => Europe/Amsterdam
    )

Can any one please let me know how to do it. Thanks

Kiran Kumar
  • 181
  • 1
  • 4
  • 13
  • so just: `???[0]['date']` –  Jan 11 '16 at 20:09
  • I tried the same, but that doesn't work for me @Dagon – Kiran Kumar Jan 11 '16 at 20:10
  • this link solved my question [link]http://stackoverflow.com/questions/19135830/echo-an-array-date-time-object-in-timestamp-format Solution: `echo $date['0']->format('Y-m-d H:i:s');` @rizier123 : my question is not duplicate with respect to your assignment. please change it over to my link provided. – Kiran Kumar Jan 12 '16 at 03:26

0 Answers0