note 20391 added to function.odbc-fetch-array

From: Date: Tue, 02 Apr 2002 11:51:12 +0000
Subject: note 20391 added to function.odbc-fetch-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-28499@lists.php.net to get a copy of this message
Just a note about the odbc_fetch_array function of Martin (above). The function actually works fine except when your resultset is empty (where $rs_assoc is not defined). To avoid this just define $rs_assoc as an array before the foreach like this : $rs_assoc = Array(); That should do the trick -- http://www.php.net/manual/en/function.odbc-fetch-array.php http://master.php.net/manage/user-notes.php?action=edit+20391 http://master.php.net/manage/user-notes.php?action=delete+20391 http://master.php.net/manage/user-notes.php?action=reject+20391

« previous php.notes (#28499) next »