Jump to content

I need help in Loops =)


whalewillie

Recommended Posts

Hi,how do a calculation in the loop with different interest rate?

 

Example:

for($i = 1; $i <= 6; $i++){

echo $i;

}

 

output is:

123456.

 

 

But what i need is '1-3' to be calculated with interest(e.g 50% ,and also '4-6' with diff interest(100%) which the output will be

1.5, 3, 4.5, 8, 10, 12

 

 

What will be the code to compute this output?

Link to comment
https://forums.phpfreaks.com/topic/207244-i-need-help-in-loops/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.