Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/283.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel,提取数组中的某些数据_Php_Laravel - Fatal编程技术网

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

Php Laravel,提取数组中的某些数据,php,laravel,Php,Laravel,如何获取下图所示突出显示区域的数据(仅日期) foreach($row as $key => $value) { //what should I dd() here? } 如果你不在乎钥匙,那就照办吧 foreach($row[1]->toDateString() as $date) { // do something here with $date } 否则,只需$value[1]->toDateString() 你能试试$value[1]->toDateStrin

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

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

如果你不在乎钥匙,那就照办吧

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

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

你能试试
$value[1]->toDateString()
?检查一下这个@CUGreen很好,很好用,谢谢