PHP 8.5.0 Alpha 4 available for testing

Voting

: zero minus zero?
(Example: nine)

The Note You're Voting On

curt at digmo dot com
24 years ago
I turned Jason's code into a function to roughly mimic the mysql_fetch_array function. I'm not a programmer and I've been messing with PHP less than a week, so I imagine there's a more efficient method that what I've come up with.


function odbc_fetch_array($rownum, $res)
{

$i = 0;
$fCount = odbc_num_fields($res);
odbc_fetch_row($res, $rownum);
while ($i < $fCount)
{
$i++;
$fName = odbc_field_name($res, $i);
$myrow[$fName] = odbc_result($res, $i);
}
$i=0;
return $myrow;
}

<< Back to user notes page

To Top