|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2011-01-01 23:42 UTC] jani@php.net
 
-Package: Feature/Change Request
+Package: ODBC related
  [2016-08-12 12:16 UTC] cmb@php.net
 
-Status:      Open
+Status:      Wont fix
-Assigned To:
+Assigned To: cmb
  [2016-08-12 12:16 UTC] cmb@php.net
 | |||||||||||||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Wed Oct 29 09:00:01 2025 UTC | 
Description: ------------ Hello, The other x_fetch_array functions you provide return an associative AND numeric array. We are are trying to port our code to odbc_fetch_array (from sqlite_fetch_array and mysql_fetch_array) and the code has mixed numeric and associative references. Because of the mixture we cannot use the odbc_fetch_array function, as any returned arrays that are dependent on numeric arrays fail. Why is this not a consistent function, and is there a workaround ? Is there a way to have the fetch_array function return a $row array for odbc with a numeric and associative index. Reproduce code: --------------- We have a class for each database called xxxxDatabase where xxxx = sqlite, mysql or odbc. This is the fetch_array function; function fetch_array($result) { $row = odbc_fetch_array($result); return $row } This only returns an associative array. function fetch_array($result) { $row = mysql_fetch_array($result); return $row } This return an associative and numeric array Expected result: ---------------- To get an array that contains associative AND numeric indexes Actual result: -------------- Associative only - not consistent with other database fetch array functions