php
$numReg = pg_num_rows($resultado);
if($numReg>0){
echo "<table border='1' align='center'>
<tr bgcolor='skyblue'>
<th>ID</th>
<th>Usuario</th>
<th>Contrasena</th></tr>";
while ($fila=pg_fetch_array($resultado)) {
echo "<tr><td>".$fila['ID']."</td>";
echo "<td>".$fila['usuario']."</td>";
echo "<td>".$fila['contrasena']."</td></tr>";
}
echo "</table>";
}else{
echo "No hay Registros";
}
pg_close($conexion);
?>