I keep getting this error message:

"Fatal error: Cannot redeclare odbc_fetch_array() in D:\intranet\Laptop\odbc_DitDB.php on line 25"

when I try and connect to a database.

I wrote the ditDB.php (below) in version 4.1 but the server i'm using now "nt 2003" is using the latest version 5.1.2 I think. Is there something different I need to add for the latest version?




<?
$odbc = odbc_connect ('DitDB', '', '') or die( "Could Not Connect to ODBC Database!");
if (function_exists(odbc_fetch_array))
return;
function odbc_fetch_array($result, $rownumber=-1) {
if (PHP_VERSION > "4.1") {
if ($rownumber < 0) {
odbc_fetch_into($result, $rs);
} else {
odbc_fetch_into($result, $rs, $rownumber);
}
} else {
odbc_fetch_into($result, $rownumber, $rs);
}

$rs_assoc = Array();
foreach ($rs as $key => $value) {
$rs_assoc[odbc_field_name($result, $key+1)] = $value;
}
return $rs_assoc;
}
?>