|
@@ 187-191 (lines=5) @@
|
| 184 |
|
if (is_array($currentOption)) {
|
| 185 |
|
$output .= '<optgroup label="' . $currentKey . '">'."\n";
|
| 186 |
|
foreach ($currentOption as $subKey => $subOption) {
|
| 187 |
|
if (is_array($value)) {
|
| 188 |
|
$selected = in_array($subKey, $value) ? ' selected' : '';
|
| 189 |
|
} else {
|
| 190 |
|
$selected = ($subKey == $value) ? ' selected' : '';
|
| 191 |
|
}
|
| 192 |
|
$selected = $subKey == $value ? ' selected' : '';
|
| 193 |
|
$output .= '<option value="' . $subKey . '"' . $selected . '>' . $subOption . '</option>'."\n";
|
| 194 |
|
}
|
|
@@ 197-201 (lines=5) @@
|
| 194 |
|
}
|
| 195 |
|
$output .= '</optgroup>'."\n";
|
| 196 |
|
} else {
|
| 197 |
|
if (is_array($value)) {
|
| 198 |
|
$selected = in_array($currentKey, $value) ? ' selected' : '';
|
| 199 |
|
} else {
|
| 200 |
|
$selected = ($currentKey == $value) ? ' selected' : '';
|
| 201 |
|
}
|
| 202 |
|
$output .= '<option value="' . $currentKey . '"' . $selected . '>' . $currentOption . '</option>'."\n";
|
| 203 |
|
}
|
| 204 |
|
}
|