1. Home
  2. Docs
  3. Function Reference
  4. Functions
  5. get_fields()

get_fields()

Get field names of a table.

Copy to Clipboard

Parameters

$table

Target table (without table_prefix)

$can_echo_query

If true the query will be echoed out (default false)

$can_prefix

If true, prefixes table names with the WordPress table prefix (default true)

Return

array

Return the field names

Example

Copy to Clipboard

The above example will return:

Copy to Clipboard
Tags