我有一个数组:
array(2) (
[0] => DMV\DrvrEdBundle\Entity\INSTRUCTOR object {
id => (int) 22
Instructor_Lic => (string) 67890
First_Name => (string) lkioli
Last_Name => (string) oioiodfdfd
Email => (string) ioii@dfdd.dfd
Status => (string) ACTIVE
CreationDate => DateTime object {
date => (string) 2014-05-20 09:46:03
timezone_type => (int) 3
timezone => (string) America/New_York
}
EditDate => DateTime object {
date => (string) 2014-05-20 09:46:14
timezone_type => (int) 3
timezone => (string) America/New_York
}
}
)
我想访问CreationDate Obj中的日期字符串。我该如何访问?
任何帮助都将不胜感激。
---迈克
答案 0 :(得分:1)
只需:
$arr[0]->CreationDate->format('Y-m-d H:i');
^--------- index of array