PHP 8.5.0 Alpha 1 available for testing

Voting

: min(two, one)?
(Example: nine)

The Note You're Voting On

h4 at locked dot org
22 years ago
my 2 cents:

function data($res) {
$obj = new stdClass();
$data_array = array();

if (!odbc_fetch_into($res, $data_array)) {
return 0;
}

$num_fields = odbc_num_fields($res);

for ($i = 0;$i < $num_fields; $i++) {
$name = odbc_field_name($res, $i + 1);
if (!$name) {
return 0;
}

$obj->{$name} = $data_array[$i];
}

return $obj;
}

works fine for me (PHP 4.3.1)

<< Back to user notes page

To Top