Ok, now I've realized this question should go in the Coding help list, but since I've figured it already out, I'll post the answer...
<?
require_once("DB.php");
$test=DB::connect("pgsql://tom:test@localhost/test");
$res = $test -> query("select * from pokus2");
while (list($val1,$val2)= $test-> fetchRow($res->result)) {
echo "$val1 - $val2<BR>";
}
?>
This requires having php4.0.2 with correct include path (/usr/local/lib/php) installed..
Tom