Ajout parametre dans select_array

This commit is contained in:
Rodolphe Quiedeville 2003-08-03 17:11:56 +00:00
parent 9b86524638
commit 41e0e846ff

View File

@ -244,15 +244,19 @@ class Form {
*
*
*/
Function select_array($name, $array, $id='')
Function select_array($name, $array, $id='', $empty=0)
{
print '<select name="'.$name.'">';
$i = 0;
if (strlen($id))
{
reset ($array);
{
if ($empty == 1)
{
$array[0] = "-";
}
sort ($array);
while (list($key, $value) = each ($array))
{
print "<option value=\"$key\" ";