Q:

php html table Q

I'M TRYING TO CREAT A (10*10) TABLE WITH LOOP USING PHP 
THIS IS MY CODE 
$i=0;
$x=0;

echo "<table>";
while ($i<10)
{
echo "<tr>";

while ($x<10)
{
echo "<td>2";
echo "<td>";
$x++;
}

echo "</tr>";
$i++;
}
echo "</table>";

why is it echoing only the  tag  

A:

You miswrote the closing <td> tag
$i=0;
$x=0;

echo "<table>";
while ($i<10)
{
    echo "<tr>";

    while ($x<10)
    {
        echo "<td>2";
        echo "</td>";
        $x++;
    }

    echo "</tr>";
    $i++;
}
echo "</table>";

