thanks a lot for your elaborate replies.
the populating of the drop-down list now works fine.
the case is as follows, i'm trying to populate the dropdown-list via a multidimensional array (because they will be audio recordings of parts of each chapter of a book).
now, first i'd like to declare the multi-dimensional array, which i have done as follows.
$book1 = array("chapter1" => array(),
"chapter2" => array(),
"chapter3" => array());
now, i'd like to populate the second dimension of this array by using for-loops, as follows:
$chapter1_amount = 4;
$chapter2_amount = 6;
$chapter3_amount = 8;
for($i=1; $i <= $chapter1_amount; $i++)
{
$book1["chapter1"][] = $i;
}
for($i=1; $i <= $chapter2_amount; $i++)
{
$book1["chapter2"][] = $i;
}
for($i=1; $i <= $chapter3_amount; $i++)
{
$book1["chapter3"][] = $i;
}
i think herein lies the mistake, at declaring the variables at the 2nd dimension. am i doing this correctly?
afterwards, i show the drop-down list as you guys have suggested:
echo "<select name=\"book1\"><option value=\"bleh\">Choose Part</option>";
foreach($book1 as $itemindex[] => $item[])
{
echo "<option value=\"$item\">$item</option>\n";
}
echo "</select>";
when doing it this way, i get a drop-down list which just has three identical elements, all entitled 'Array'.
once this is done, i was just wondering how i could for example manipulate a link next to it to link to a file according to the chosen element in the list.
i'd very much appreciate your help, really
pygmalion