PHP - Manual: fbsql_field_name
2025-10-31
(PHP 4 >= 4.0.6, PHP 5, PHP 7)
fbsql_field_name — Get the name of the specified field in a result
$result
   [, int $field_index
  ] ) : stringReturns the name of the specified field index.
resultA result pointer returned by fbsql_list_fields().
field_indexThe numerical offset of the field. The field index starts at 0.
   Returns the name as a string, or FALSE if the field doesn't exist.
  
Example #1 fbsql_field_name() example
<?php
// The users table consists of three fields:
//   user_id
//   username
//   password.
$res = fbsql_db_query("users", "select * from users", $link);
echo fbsql_field_name($res, 0) . "\n";
echo fbsql_field_name($res, 2);
?>
以上例程会输出:
user_id password
 add a note
 add a note
  官方地址:https://www.php.net/manual/en/function.fbsql-field-name.php