所以,我有一个具有这种结构的值的数组:
$values = array(
"2012-01-01 00:15:00" => "0.01",
"2012-01-01 00:30:00" => "0.34",
"2012-01-01 00:45:00" => "0.51",
);
如您所见,值之间的间隔为 15 分钟。有时我会得到缺失值,例如:
$values = array(
"2012-01-01 00:15:00" => "0.01",
"2012-01-01 00:30:00" => "0.34",
"2012-01-01 01:01:00" => "0.23",
);
"2012-01-01 00:45:00"
在数组中以正确的顺序添加缺失值和像“0.00”这样的标准值的最佳方法是什么(较少的 CPU 密集型) ?
谢谢。