Here's what I came up with to fix the percentage math issue, but now the issue is that for each iteration, the nex value of $Monthly is stored into the variable and increases it by that much each time rather than increasing by the initial amount only. The $Percentage column should display 1%, 2%, 3%, 4% etc. The $Annual Column should display $500.00, $1000.00, $1500.00, $2000.00 etc. and those two work beautifully. The final column, $Monthly is supposed to be $Ammount * $Percent/12 with $Ammount being a constant of $50,000, which it is. $Monthly is supposed to take $50,000 and multiply it by the percent of that row which it does so that on row 1 it would be $50,000 * 0.01 and then divide that by 12 (12 months in a year) to display the monthly rate, and that part works fine. But then on row 2 it's supposed to simply take the value of $Monthly and add it to itself. Then on row 3 it's supposed to take the initial value and again add to itself. Instead, it keeps re-writing the variable with the new number. I need it to do like this: (this is just an example, not the actual numerical data) 3+3=6; 6+3=9; 9+3=12 etc. Instead, it's doing this: 3+3=6; 6+6=12; 12+12=24; 24+24=48 etc. The picture I attached to this shows how it should look with correct results and all.
<!--Indicates page is HTML5 compliant--><!DOCTYPE html>
<html>
<head>
<!--Titles the page at the top such as on the browser tab (w/ Chrome)-->
<title>Monthly & Yearly Interest</title>
<!--Pulls the CSS styling from the main.css page-->
<link rel="stylesheet" type="text/css" href="main.css">
</head>
<body>
<main>
<h2>Yearly and Monthly Interest for $50,000 at Varying Rates</h2>
<table>
<tr><td>Rate</td><td>Annual Interest</td><td>Monthly Interest</td></tr>
<?php
// Variables
$Ammount = 50000;
$Annual= number_format(500,2);
$Percent = 1;
$Monthly = number_format($Ammount * ($Percent/100)/12,2);
//For loop to display Percent, Annual and Monthly data in their respective columns for one row
for ($counter = 1; $counter <= 10; $counter++) {
echo "<td>$Percent%</td><td>$" . number_format($Annual, 2) . "</td><td>$" . number_format($Monthly, 2) . "</td>";
//Increments
$Percent++;
$Annual+=500;
$Monthly += $Monthly;
//Next row
echo "<tr></tr>";
}
?>
</table>
</main>
</body>
</html>