hierselect.php
| From: | Keith Edmunds | Date: | Tue, 05 Aug 2003 22:40:02 +0000 |
| Subject: | hierselect.php | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-7031@lists.php.net to get a copy of this message | ||
In the example at the head of the code for hierselect.php it says:
* Ex:
* $form->setDefaults(array('test' => array('4','15')));
* $sel =& $form->addElement('hierselect', 'test', 'Test:',
null, '/');
* $mainOptions = $db->getAssoc('select pkparent, par_desc from
parent'); * $sel->setMainOptions($mainOptions);
*
* $result = $db->query("select fk_parent, pkchild, chi_desc from
child"); * while ($result->fetchInto($row)) {
* $secOptions[$row[0]][$row[1]] = $row[2];
* }
* $sel->setSecOptions($secOptions);
What are the defaults, 4 and 15, setting? I've tried this example, and
it works but changing the 4 and 15 to other values makes no discernible
difference.
Thanks.
--
Keith Edmunds