我有共同点:
$percentageAndRepData = [
1 => [
"main" => [0.65, 0.75, 0.85, 5, 5, 5],
"assistance" => [0.5, 0.6, 0.7, 10, 10, 10]
],
2 => [
"main" => [0.7, 0.8, 0.9, 3, 3, 3],
"assistance" => [0.6, 0.7, 0.8, 8, 8, 6]
],
3 => [
"main" => [0.75, 0.85, 0.95, 5, 3, 1],
"assistance" => [0.65, 0.75, 0.85, 5, 5, 5]
],
4 => [
"main" => [0.1, 0.4, 0.6, 5, 5, 5],
"assistance" => [0.4, 0.5, 0.6, 5, 5, 5]
]
];
我有以下职能:
function liftCalculator ($trainingMax, $firstSetPercentage, $secondSetPercentage,
$thirdSetPercentage, $firstSetReps, $secondSetReps, $thirdSetReps)
用户投入将提供<条码>培训Max,但我希望<条码>、<条码>和<条码>“协助”条码>阵列中与<条码>计算器条码>参数其余部分对应的所有其他内容。
So on "main"
I want to pass 0.65
as $firstSetPercentage
, 0.75
as
$secondSetPercentage,
and so on. Then the same on "assistance"
, and then repeat for every week.
我将穿透阵列作为争执的论据,但找不到允许我用不同方法提出第一个论点的方法。 我发现的所有例子都假定该职能的所有参数来自各阵列。