Example output (bug #49157)

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@290813 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jakub Vrana 2009-11-16 12:21:22 +00:00
parent bc371d7a93
commit ac4d489754

View file

@ -60,23 +60,43 @@
<?php
$conn = pg_pconnect("dbname=publisher");
if (!$conn) {
echo "An error occured.\n";
exit;
echo "An error occured.\n";
exit;
}
$result = pg_query($conn, "SELECT * FROM authors");
if (!$result) {
echo "An error occured.\n";
exit;
echo "An error occured.\n";
exit;
}
$arr = pg_fetch_all($result);
var_dump($arr);
print_r($arr);
?>
]]>
</programlisting>
&example.outputs.similar;
<screen>
<![CDATA[
Array
(
[0] => Array
(
[id] => 1
[name] => Fred
)
[1] => Array
(
[id] => 2
[name] => Bob
)
)
]]>
</screen>
</example>
</para>
</refsect1>