diff options
Diffstat (limited to 'includes/view-helpers')
-rw-r--r-- | includes/view-helpers/select_field.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/includes/view-helpers/select_field.php b/includes/view-helpers/select_field.php index e72fc40..aa156d0 100644 --- a/includes/view-helpers/select_field.php +++ b/includes/view-helpers/select_field.php @@ -19,13 +19,12 @@ namespace EternalTerror\ViewHelpers; */ function select_field( string $name, - array $opts = [], + array $opts = array(), $selected = null, - string $blank = "Please select...") : string -{ + string $blank = 'Please select...' ) : string { $body = "<option value=\"\">{$blank}</option>"; - foreach ($opts as $opt) { - $sel = selected($selected, $opt[0], false); + foreach ( $opts as $opt ) { + $sel = selected( $selected, $opt[0], false ); $body .= "<option value=\"{$opt[0]}\"{$sel}>{$opt[1]}</option>"; } return "<select name=\"{$name}\">{$body}</select>"; |