$y=10; for ($x=1;$x<=$y; $x++) { print "$x -->\t"; foreach (1..$y) { $result = $x*$_; print "$result\t"; } print "\n"; }