Si estas haciendo el codigo de PHP antes del HTML tienes que colocar la información en una variable ahora si estas insertando el PHP dentro del HTML lo que tienes que usar es el echo Ejemplo
Con variable
Código PHP:
<?php
$table = "";
while($row = mssql_fetch_array($result)) {
$table .= "<tr>";
$table .="<td> ".$row[0]."</td>";
$table .="<td> ".$row[1]."</td>";
$table .="<td> ".$row[2]."</td>";
$table .="</tr>";
}
?>
<HTML>
<BODY>
<table>
<?php echo $table; ?>
</table>
</BODY>
</HTML>
Directamente
Código PHP:
<HTML>
<BODY>
<table>
<?php
$table = "";
while($row = mssql_fetch_array($result)) {
echo "<tr>";
echo "<td> ".$row[0]."</td>";
echo "<td> ".$row[1]."</td>";
echo "<td> ".$row[2]."</td>";
echo "</tr>";
}
?>
</table>
</BODY>
</HTML>
Tu escoges como hacerlo