odbc_fetch_array

array odbc_fetch_array(resource result, [int row]) 

Fetches a row of data as an array.

Returns:

Array of row data; FALSE if there are no more rows

Description:

Reads the current row in the ODBC result set and returns an associative array with each element containing the value of the corresponding field and each key containing the field name.

Warning:

This function is only available if you have compiled PHP with DBMaker support. DBMaker is available from www.dbmaker.com.

Version:

Existing since version 4.0

Example:

Display query results
$db = odbc_connect("simdb","SYSADM",""); 
$sql = "SELECT * from t1"; 
$result = odbc_exec($db, $sql); 
while ($row = odbc_fetch_array($result)) {
   echo $row["c1"], "\n"; 
} 

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.