Re: Hierarchical select
| From: | Justin Patrin | Date: | Thu, 02 Dec 2004 19:45:51 +0000 |
| Subject: | Re: Hierarchical select | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-15972@lists.php.net to get a copy of this message | ||
On Thu, 2 Dec 2004 11:48:38 -0600, pitesaj@peteramayer.com
<pitesaj@peteramayer.com> wrote:
> I can get a hierarchical select to work using static arrays. However,
> cannot figure out how to generate the keys in the secondary select
> dynamically. Does anyone have any code they can share?
>
> $main[0] = "Pop";
> $main[1] = "Rock";
> $main[2] = "Classical";
>
> $secondary[0][0] = "Belle & Sebastian";
> $secondary[0][1] = "Elliot Smith";
> $secondary[0][2] = "Beck";
> $secondary[1][3] = "Led Zep";
> $secondary[1][4] = "Violent Femmes";
> $secondary[2][5] = "Wagner";
> $secondary[2][6] = "Mozart";
> $secondary[2][7] = "Beethoven";
>
What PEAR package does this refer to? I can only guess
HTML_QuickForm's hierselect, but you didn't mention one...
$arr[] = 'pop';
$arr[0][] = 'Belle';
$arr[0][] = 'Elliot';
--
Justin Patrin