This chapter deal with options related to particular database columns. Later
there will be often used term field, what means exactly the same
thing as column.
Fields will be displayed in table columns left to right on the screen in the
order in which they appear in the script. Re-arrange the order of the arrays in
order to alter the order in which columns are displayed.
Display of a particular column can also be suppressed. Below is an example of
the array for a column named 'topic':
Example 4-1. Basic field definition
$opts['fdd']['topic'] = array(
'name' => 'Topic',
'select' => 'T',
'maxlen' => 100,
'nowrap' => false,
'sort' => true
Because so many questions related to PHP programming language
semantics and basis are often asked, please point on the following explanation
of "two" ways of possible field options initialization. If you are enough
experienced and familiar with PHP, feel free to skip to the next
As it was mentioned, there are two ways how to initialize array in
- Direct one using
$opts['fdd']['col_name'] = array('option' => 'value')
which is showed above.
- Postinitialization one using
$opts['fdd']['col_name']['option'] = 'value'
which is used in many examples in this documentation.
You may realize, that it is the same if you will change or add option into basic
field definition (see example
array() and notes in first point
above) or you will add separated option initialization after this field
definition as it is described in second case.