updated example to use while

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@111626 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Jason Sheets 2003-01-13 03:17:20 +00:00
parent 9c4ae88f49
commit 27b807d1f5

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.4 $ -->
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/pgsql.xml, last change in rev 1.2 -->
<refentry id="function.pg-fetch-row">
<refnamediv>
@ -48,13 +48,9 @@ if (!$result) {
exit;
}
$num = pg_num_rows($result);
for ($i=0; $i < $num; $i++) {
$r = pg_fetch_row($result, $i);
for ($j=0; $j < count($r); $j++) {
echo "$r[$j]&nbsp;";
while ($row = pg_fetch_row($result, $i)) {
for ($j=0; $j < count($row); $j++) {
echo "$row[$j]&nbsp;";
}
echo "<BR>";