我有一个数组:
array (size=3)
0 =>
array (size=3)
'quantity' => string '20' (length=2)
'date' => string '2016-01-01' (length=10)
'eID' => string '2' (length=1)
1 =>
array (size=3)
'quantity' => string '10' (length=2)
'date' => string '2016-03-01' (length=10)
'eID' => string '2' (length=1)
2 =>
array (size=3)
'quantity' => string '15' (length=2)
'date' => string '2016-01-01' (length=10)
'eID' => string '1' (length=1)
如何填写每个'eID'的缺失日期?所以输出将是:
array (
0 =>
array (
'quantity' => string '20' (length=2)
'date' => string '2016-01-01' (length=10)
'eID' => string '2' (length=1)
1 =>
array (
'quantity' => null
'date' => string '2016-02-01' (length=10)
'eID' => string '2' (length=1)
2 =>
array (
'quantity' => string '10' (length=2)
'date' => string '2016-03-01' (length=10)
'eID' => string '2' (length=1)
...直到2016-12-01。每个'eID'键的12个数组具有相同的值