if (!$resultat) {
echo "Erreur postgres :".pg_last_error()."</p>";
}else{
echo "Interrogation réussie</p>";
echo "<table border=1>" ;
echo "<tr><th>attribut1</th><th>attribut2</th></tr>";
while ($ligne=pg_fetch_array($resultat,null, PGSQL_ASSOC)) {
echo "<tr>";
echo "<td>".$ligne['attribut1']."</td>";
echo "<td>".$ligne['attribut2']."</td>";
echo "</tr>";
}
echo "</table>";
}