Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Štvrtok, 28. marec 2024
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Dokumentácia  »  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
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov