<?php
/***************************************************************************
- * Copyright (C) 2003-2009 Polytechnique.org *
+ * Copyright (C) 2003-2010 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
// on ajoute une entree vide si $pad est vrai
$html = "";
if ($pad) {
- $html .= sprintf("<option value=\"\"%s></option>\n", ($valeur ? $sel : ""));
+ $html .= sprintf("<option value=\"\"%s> </option>\n", ($valeur ? $sel : ""));
}
while (list($my_id, $my_text) = $res->next()) {
- $html .= sprintf("<option value=\"%s\"%s>%s</option>\n", $my_id, ($valeur==$my_id ? $sel : ""), $my_text);
+ $html .= sprintf("<option value=\"%s\"%s>%s</option>\n", $my_id, ($valeur==$my_id ? $sel : ""), $my_text?$my_text:" ");
}
return $html;