I use this function to get my recordset in an array, and it's very easy to use.
function dbquery($sql) {
$arr = array();
$conn = odbc_connect('dsn','user','pass');
$rs = odbc_exec($conn,$sql);
$x = 1;
while (odbc_fetch_row($rs)) {
for ($y = 1; $y <= odbc_num_fields($rs); $y++)
$arr[$x][$y] = odbc_result($rs,$y);
$x++;
}
if ($x > 1)
return $arr;
}
usage:
$arr=dbquery("SELECT * FROM tblTable");
echo $arr[1][1] //echo's first column of the first row