Laravel,提取数组中的某些数据

时间:2017-09-13 01:47:08

标签: php laravel

如何在突出显示的区域获取数据(仅限日期),如下图所示?

foreach($row as $key => $value)
{
  //what should I dd() here?
}

array

1 个答案:

答案 0 :(得分:1)

如果您不关心按键,请执行

foreach($row[1]->toDateString() as $date) {
    // do something here with $date
}

否则,只需$value[1]->toDateString();