Platon Technologies
not logged in Login Registration
open source software development celebrating 10 years of open source development! Sunday, August 7, 2022
About Us
Open Source
Index  »  Projects  »  phpMyEdit  »  Documentation  »  HTML  »  Fields options

Chapter 4. Fields options

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.

4.1. Definition overview

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 section.

As it was mentioned, there are two ways how to initialize array in PHP.

  1. Direct one using $opts['fdd']['col_name'] = array('option' => 'value') which is showed above.
  2. 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.

Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top · Feedback form · Application form
Report bug on PLATON.SK website · Terms of use · Privacy policy