I am having problems displaying the results of function calculateGrowth. As shown below, I would like to find the results for each day of a 10 day period. I used a for loop for obvious reasons. But when I try to display results, all I get back is one result.
function calculateGrowth(){
$days = 0;
$growth = 10;
for($days = 0; $days < 10; $days++){
$totalGrowth = $growth * pow(2, $days/10);
}
return $totalGrowth;
}
Current Output
18.6606598307
Desired Output
Day Growth
1 - result
. - result
. - result
10