如果$b
中存在月份号,请尝试替换$a
的值。
顺便说一下$ a是数据库结果。
这是我的$b array
Array
(
[1] => Array
(
[current] => Array
(
[year] => 2019
[month] => 1
)
[past] => Array
(
[year] => 2018
[month] => 1
)
)
[2] => Array
(
[current] => Array
(
[year] => 2019
[month] => 2
)
[past] => Array
(
[year] => 2018
[month] => 2
)
)
)
这是我的$a array
Array
(
[0] => Array
(
[year] => 2018
[month] => 1
[total_ca] => 1200.000000
)
[1] => Array
(
[year] => 2019
[month] => 6
[total_ca] => 6000.000000
)
)
所以我该如何替换我的$b month and year values
。通过使用$a month and year values
谢谢