Here is the code (I've used while). See line #17 - I've used double quotes instead of singles ones:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<?php
$i = 1;
echo '<table border="1">';
while ( $i <= 10 ) {
echo '<tr>';
$n = 1;
while ( $n <= 3 ) {
echo "<td>Row $i | Col $n</td>";//Use double quotes for $i and $n
$n++;
}
echo '</tr>';
$i++;
}
echo '</table>';
?>
</body>
</html>
...and the result in the browser: