';
for ($i = 0; $i < pg_num_fields($result); $i++) {
echo ''.pg_field_name($result, $i).' | ';
}
echo '
';
while ($row = pg_fetch_row($result)) {
echo '';
for ($i = 0; $i < pg_num_fields($result); $i++) {
echo ''.$row[$i].' | ';
}
echo '
';
}
pg_free_result($result);
echo '';
pg_close($conn);
?>