0) { $reverseArray = array_reverse(array_slice($array, $key - 1, 2, true)); // make a reversed array of the two entries, preserving keys array_splice($array, $key - 1, 2, $reverseArray); // replace the given range in the oldArray with the reversed Array } } else if ($dir == 1) { // move down if ($key < count($array) - 1) { $reverseArray = array_reverse(array_slice($array, $key, 2, true)); // make a reversed array of the two entries, preserving keys array_splice($array, $key, 2, $reverseArray); // replace the given range in the oldArray with the reversed Array } } } /* * * Edit code * */ if (isset($_POST['editStep'])) { editStep($_POST['pipelineContents']); } function editStep($step) { $_SESSION['activeStep'] = $step; switch (strtolower(substr($step, 0, strlen($step) - 2))) { case "questionnaire": redirect("editQuestionnaire.php?UID=$step->uid"); break; case "notice": redirect("editNotice.php?UID=$step->uid"); break; case "application": redirect("editApplication.php?UID=$step->uid"); break; case "dashboard": redirect("editDashboard.php?UID=$step->uid"); break; default: die("Invalid or no step type selected!"); break; } } ?>
Really delete all?
Add: