<?php $tri = [1, 1]; for ($x = 0; $x <= 6; ++$x) { var_export($tri); $trinew = [1]; for($y = 0, $count = count($tri); $y < $count; ++$y) { $z = $y + 1; $trinew[] = $tri[$y] + ($tri[$z] ?? 0); } $tri = $trinew; }
You have javascript disabled. You will not be able to edit any code.