Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

makefileopts

This function will create <option></option> from the entries in a given array, often created by the makefilelist() function.
The selected option is given by the $selected.

makefileopts

Quote

makefileopts ( array $files [, string $selected ] )


Parameters
files
The array which contains the file

selected
The files in the options you want to be selected by default

Return Values
This function will return the array as a list of options for a select.

Example
Code
<?php
$files = array("articles", "news_cats", "photoalbum", "ranks", "smiley");
$selected = "ranks";
 
echo "<select>";
echo makefileopts($files, $selected);
echo "</select>";
?>
Here we will make a select out of the array $files and we wanted the option where ranks was present selected

Output

Quote

<select>
<option value='articles'>articles</option>
<option value='news_cats'>news_cats</option>
<option value='photoalbum'>photoalbum</option>
<option value='ranks' selected='selected'>ranks</option>
<option value='smiley'>smiley</option>
</select>