代码如下:
<?php
function getNow(){
$data = [];
$format='Y.m.d';
for ($i=0; $i<1; $i++){
$strtotime = strtotime( '+' .$i.' days');
$data[$i]['date'] = date($format ,$strtotime);
$data[$i]['week'] = "星期" . mb_substr( "日一二三四五六",date("w" ,$strtotime),1,"utf-8" );
}
return $data;
}
var_dump(getNow());
?>
效果如下: