pg_fetch_array1.htm
 
$emp_array = pg_fetch_array($result, 0, PGSQL_NUM);
echo "eid::".$emp_array [0] . " || ";
echo "fname:: ".$emp_array [1] . " || ";
echo "lname ::".$emp_array [2] . " ||";
echo "address:: ".$emp_array [3] . " <br/>";
echo "----------PGSQL_ASSOC-----------------<br/>";
$arr = pg_fetch_array($result, NULL, PGSQL_ASSOC);
echo "emp fname :". $arr["fname"] ;
echo "&nbsp : emp lname :".$arr["lname"]." ";
echo "&nbsp : emp address :".$arr["address"]." <br/>";
echo "pg_fetch_array Fetch a row as an array <br/>";