<?php $n = 1; while($n<=9){ $i = 1; while($i<=$n){ echo "$i"."x"."$n=".($i*$n)." "; $i++; } echo "<br />"; $n++; }