diff --git a/app/model/PageModel.php b/app/model/PageModel.php index a9e7bb3..112402b 100644 --- a/app/model/PageModel.php +++ b/app/model/PageModel.php @@ -67,7 +67,7 @@ class PageModel extends Model { // Pull sections from cache $sections = Db::getSections(); - return [0 => 'Select section'] + array_combine( + return ['' => 'Select section'] + array_combine( array_column($sections, 'id'), array_column($sections, 'title') ); diff --git a/app/views/admin/crud/create.php b/app/views/admin/crud/create.php index 0386b17..b4ad76f 100644 --- a/app/views/admin/crud/create.php +++ b/app/views/admin/crud/create.php @@ -43,7 +43,7 @@ - > dropdownData[$key] as $dropdownKey => $value) { ?> diff --git a/app/views/admin/crud/edit.php b/app/views/admin/crud/edit.php index 8cc7f68..e75e436 100644 --- a/app/views/admin/crud/edit.php +++ b/app/views/admin/crud/edit.php @@ -45,7 +45,7 @@ - > dropdownData[$key] as $dropdownKey => $value) { ?>