$memberId = (int) $_POST['memberId']; switch ($_POST['opt']) { case 1: if ($tasks = $model->getPendingTasksByUser()) { echo Layout_View::listTasks($tasks); } else { ?> <div class="alert alert-dismissible alert-info"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>Great! </strong> There are no pending tasks! </div> <?php } break; case 2: if ($tasks = $model->getTodayTasksByUser()) { echo Layout_View::listTasks($tasks); } else { ?> <div class="alert alert-dismissible alert-info"> <button type="button" class="close" data-dismiss="alert">×</button> <strong>Great! </strong> There are no tasks for today! </div> <?php } break; case 3: if ($tasks = $model->getFutureTasksByUser()) { echo Layout_View::listTasks($tasks); } else { ?>