我拥有一个最大深度为4级的多面阵列,但并非所有栏目都存在于低级,有些栏目含有分门槛而不是原始价值。
我需要计算一栏数值的总和。
我希望得到总额[价格]、[结果]和[儿童]的资金,但未能扭转这一水平。
我应当举这个例子:price=380成年人=5 和儿童=1
。
我的投入阵列如下:
[
8 => [
2 => [
num_rooms => 2,
adults => [1, 1],
children => [0, 0],
prices => [50, 50],
price => 130,
supp => 30,
],
3 => [
num_rooms => 1,
adults => [1],
prices => [100],
price => 150,
supp => 50,
],
],
1 => [
2 => [
num_rooms => 2,
adults => [1, 1],
children => [1, 0],
prices => [75, 75],
price => 170,
supp => 20,
],
],
]