public function GetOpsPremiums()
{
// Get the Cost Multiplier
$costMulti = $this->GetCostMultiplier();
// Get the Prem Ops
$premOps = $this->GetPremOpsEL();
// Get the Factors
$factors = $this->GetFactors();
// Get the full class array
$classArray = $this->GetClassArray();
foreach ($classArray as $key => $values) {
$classTotalHalved = $values / 1000;
$mainMultiplier = $costMulti * $premOps[$key] * $factors[$key]['premops'];
$premium = $classTotalHalved * $mainMultiplier;
$opsPremiums = array(
$key => round($premium)
);
}
return $opsPremiums;
}
I want $opsPremiums to not just iterate 1 at a time. I need it to iterate and add itself to itself.
I tried
foreach ($opsPremiums as $key2 => $values2) {
$opsPremiums = array(
$key => round($premium)
);
}
Can someone explain to me what I need to do in order to get the $opsPremium to stack itself neatly into a single array?
should be so