如何显示下一个利率,如下图所示

Expectation enter image description here

My Code

<?php
$value = 100;
$years = 5;
for ($i = 1; $i <= $years; $i++) {
    $income = round($value * (pow(1+6/100, $i)), 2);
    echo $i, " ", $income, "<br>";
}
?>

Output

1 106
2 112.36
3 119.1
4 126.25
5 133.82

How can I get result like my expectation above ?

Just add one more loop

$value = 100;
$years = 5;
for ($i = 1; $i <= $years; $i++) {
  $income = array();
  for ($j = 6; $j <= 10; $j++) {
    $income[] = round($value * (pow(1+$j/100, $i)), 2);
  }
  echo $i, " ", implode(' ', $income), "<br>";
}