1
zer0fill
manually typing in array index in xoops_version.php, required?
  • 2004/1/7 3:35

  • zer0fill

  • Not too shy to talk

  • Posts: 137

  • Since: 2003/12/2


do we really need to specify the index number of arrays in the xoops_version.php file?

ex:
$modversion['tables'][1] = 'flexsearch_category';
$modversion['tables'][2] = 'flexsearch_tree';
$modversion['tables'][3] = 'flexsearch_tree_type';
$modversion['tables'][4] = 'flexsearch_text';
$modversion['tables'][5] = 'flexsearch_data';
$modversion['tables'][6] = 'flexsearch_info';


than simply doing
$modversion['tables'][] = 'flexsearch_category';
$modversion['tables'][] = 'flexsearch_tree';
$modversion['tables'][] = 'flexsearch_tree_type';
$modversion['tables'][] = 'flexsearch_text';
$modversion['tables'][] = 'flexsearch_data';
$modversion['tables'][] = 'flexsearch_info';


same goes with templates and anything else that requires an index number. not having to type in the index makes life so much easier when developing a new module; we don't have to renumber the array if we organize things in a specific order when adding in a new element.

Login

Who's Online

159 user(s) are online (82 user(s) are browsing Support Forums)


Members: 0


Guests: 159


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits