<?php for ($a = 1; $a < 10; $a++, $sum = $a * $a) { echo "$a * $a = $sum\n"; }
Standard input is empty
1 * 1 = 2 * 2 = 4 3 * 3 = 9 4 * 4 = 16 5 * 5 = 25 6 * 6 = 36 7 * 7 = 49 8 * 8 = 64 9 * 9 = 81
PHP Notice: Undefined variable: sum in /home/JgBYeR/prog.php on line 7