Test 2025

New Search

Schedule

get_term_options(); ?>
openings == 'yes' ? ' CHECKED' : ''); ?>>
weekday == 'Mon' ? ' CHECKED' : ''); ?>>
weekday == 'Tues' ? ' CHECKED' : ''); ?>>
weekday == 'Wed' ? ' CHECKED' : ''); ?>>
weekday == 'Thu' ? ' CHECKED' : ''); ?>>
weekday == 'Fri' ? ' CHECKED' : ''); ?>>
weekday == 'Sat' ? ' CHECKED' : ''); ?>>
get_schedule_options(); ?>
get_credit_options(); ?>

Course Details

get_subject_area_options(); ?>
get_instruction_type_options(); ?>
get_faculty_options(); ?>
cardin_req == 'yes') ? ' CHECKED' : ''); ?>>
advanced_writing_req == 'yes') ? ' CHECKED' : ''); ?>>
submitted): //start form check ?> get_search_results(); ?> Search Again

Your search:

'); ?> get_filters_applied(); ?>
$value): ?>

No Courses Found

title; ?>

Course Schedule Instructor Total Seats
                          
                        
Something went wrong'; } ?> '', 'cardin' => '', 'credit' => '', ); public $catalog_path; public $course_path; public $faculty_path; public $today; public $current_month; public $current_year; public $next_year; public $pdo; public $submitted; public $faculty; public $instr_type; public $keyword; public $current; public $weekday; public $schedule; public $credit_hours; public $cardin_req; public $advanced_writing_req; public $subject_area; public $openings; public $semester_months; public $semester_name; public $semester_number; public $title; function __construct() { if(substr( $_SERVER['HTTP_HOST'], 0, 9) == 'localhost') { include 'config.php'; } else { include($_SERVER['DOCUMENT_ROOT'] . '/media/sol/include/db_settings.php'); } // Setup db connection $this->pdo = new PDO("sqlsrv:Server=".$DB_HOST.",".$DB_PORT.";Database=".$DB_DATABASE." ",$DB_USERNAME ,$DB_PASSWORD); $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this->catalog_path = '/test-pages/test-2025/'; $this->course_path = '/academics/course-catalog/course.php'; $this->faculty_path = '/faculty--research/directory/profile/index.php'; $this->submitted = (!empty($_GET) || !empty($_POST)) ? true : false; $this->faculty = $this->get_parameter('faculty'); $this->instr_type = $this->get_parameter('instr_type'); $this->keyword = $this->get_parameter('keyword'); $this->current = $this->get_parameter('current'); $this->weekday = $this->get_parameter('weekday'); $this->schedule = $this->get_parameter('schedule'); $this->credit_hours = $this->get_parameter('credit_hours'); $this->cardin_req = $this->get_parameter('cardin_req'); $this->advanced_writing_req = $this->get_parameter('advanced_writing_req'); $this->subject_area = $this->get_parameter('subject_area'); $this->openings = $this->get_parameter('openings'); // Default some values $this->today = date("Y-m-d"); $this->current_month = date('m'); $this->current_year = date('Y'); $this->next_year = $this->current_year + 1; // Set title $this->title = empty($this->current) ? 'All Courses' : $this->current; switch($this->current_month) { case "1": case "2": $this->semester_months = "January,February,March"; $this->semester_name = "Fall"; $this->semester_number = 2; break; case "3": case "4": case "5": $this->semester_months = "March,April,May"; $this->semester_name = "Spring"; $this->semester_number = 1; break; case "6": case "7": case "8": $this->semester_months = "June,July,August"; $this->semester_name = "Summer"; $this->semester_number = 3; break; case "9": case "10": case "11": case "12": $this->semester_months = "September,October,November,December"; $this->semester_name = "Fall"; $this->semester_number = 2; break; } } function get_parameter($parameterName) { return isset($_GET[$parameterName]) ? $_GET[$parameterName] : (isset($_POST[$parameterName]) ? $_POST[$parameterName] : ""); } function get_flag_year() { if($this->current_month > 7) { return $this->current_year - 2; } else { return $this->current_year - 3; } } function get_faculty_name_by_id($id) { if (!empty($id)) { $result = $this->pdo->prepare("Select Fname,Lname from tblFaculty where facultyNum=:facultyNum"); $result->execute(['facultyNum' => $id]); $row = $result->fetch(PDO::FETCH_ASSOC); } return !empty($row) ? ($row['Lname'] . ", " . $row['Fname']) : ""; } function get_subject_area_by_id($id) { if (!empty($id)) { $result = $this->pdo->prepare("Select CourseSubNum, CourseSub from tblCourseSub where CourseSubNum=:subjectArea"); $result->execute(['subjectArea' => $id]); $row = $result->fetch(PDO::FETCH_ASSOC); } return !empty($row) ? $row['CourseSub'] : ""; } function get_instruction_type_by_id($id) { if (!empty($id)) { $result = $this->pdo->prepare("Select SchedTypeNum, SchedType from tblSchedType where SchedTypeNum=:instrType"); $result->execute(['instrType' => $id]); $row = $result->fetch(PDO::FETCH_ASSOC); } return !empty($row) ? $row['SchedType'] : ""; } function get_filters_applied() { $filters_applied = [ 'Keywords' => $this->keyword, 'Faculty' => $this->get_faculty_name_by_id($this->faculty), 'Subject Area' => $this->get_subject_area_by_id($this->subject_area), 'Instruction Type' => $this->get_instruction_type_by_id($this->instr_type), 'Day' => $this->weekday, 'Credit Hours' => $this->credit_hours, 'Term Offered' => $this->current, 'Scheduled Time' => $this->schedule, 'Cardin' => $this->cardin_req, ]; return $filters_applied; } function get_search_results() { $sql = " SELECT cu.CurriculumNum, cu.CRN, cu.CourseNum, co.likecoursenum, cu.year, cu.semester, fa.LName, fa.facultynum, cu.sec_instructor, co.coursetitle, cu.timesched, cu.schedtype, cu.credit AS CuCredit, cu.faculty, cu.day_time1, cu.day_time2, cu.room, cu.enrolimit, cu.courseType, cu.acadyear, cu.cardin, cu.cr_nc, cu.cert, cu.opennings, cu.banner_max, cu.banner_enrollment, co.credit AS CoCredit FROM tblcurriculum cu, tblcourseac co, tblfaculty fa WHERE (cu.coursenum = co.coursenum AND cu.faculty = fa.facultynum AND cu.hide = 0 AND co.active = 'A' AND co.hide = 0 AND ( cu.year > " . $this->get_flag_year() . " OR ( cu.year = " . $this->get_flag_year() . " AND cu.semester = 2 ) ) AND cu.year IS NOT NULL AND cu.semester IS NOT NULL ) " . $this->get_search_results_conditions() . " ORDER BY co.coursetitle, cu.year DESC, CASE cu.semester WHEN 1 THEN 1 WHEN 3 THEN 2 WHEN 2 THEN 3 END DESC, cu.crn, sec_instructor"; $result = $this->pdo->prepare($sql); $result->execute(); $classes = []; $other_classes = []; $crns = []; $second_instructor = ""; $courses = array(); while ($row = $result->fetch(PDO::FETCH_ASSOC)) { // $courses[] = $this->process_course_result($row); $options = array( 'semester' => '', 'sims_semester_code' => '', 'openings_cut_off_month' => '', 'show_curriculum' => '', 'today_time' => '', ); switch($row['semester']) { case "1": $options['semester'] = "Spring"; $options['sims_semester_code'] = "02"; $options['openings_cut_off_month'] = "3"; break; case "2": $options['semester'] = "Fall"; $options['sims_semester_code'] = "09"; $options['openings_cut_off_month'] = "10"; break; case "3": $options['semester'] = "Summer"; $options['sims_semester_code'] = "06"; $options['openings_cut_off_month'] = "7"; break; case "4": $options['semester'] = "Winter"; $options['sims_semester_code'] = ""; $options['openings_cut_off_month'] = ""; break; default: $options['semester'] = ""; $options['sims_semester_code'] = ""; $options['openings_cut_off_month'] = ""; } $options['show_curriculum'] = FALSE; switch($this->current_month){ case 1; case 2; case 3; if ($options['sims_semester_code'] == "02" and $this->current_year == $row['year']) { $options['show_curriculum'] = TRUE; } break; case 4; case 5; if ($this->current_year == $row['year'] || ($this->next_year == $row['year'] && $options['sims_semester_code'] == '02')) { $options['show_curriculum'] = TRUE; } break; case 6; case 7; case 8; if (($this->current_year == $row['year'] && ($options['sims_semester_code'] == '06' || $options['sims_semester_code'] == '09')) || ($this->next_year == $row['year'] && $options['sims_semester_code'] == '02')) { $options['show_curriculum'] = TRUE; } break; case 9; case 10; case 11; case 12; if (($this->current_year == $row['year'] && $options['sims_semester_code'] == '09') || ($this->next_year == $row['year'] && $options['sims_semester_code'] == '02')) { $options['show_curriculum'] = TRUE; } break; } // Current Year or Future Classes $options['today_time'] = strtotime($this->today); $options['expire_time'] = strtotime($row['year'] . "/" . $options['openings_cut_off_month'] . "/01"); $options['course_cut_off'] = $row['year'] . "-" . $options['openings_cut_off_month'] . "-01"; $options['seats_available'] = ''; $options['seats_count'] = ''; $options['current_year'] = (($options['expire_time'] >= $options['today_time']) || ($row['year'] == $this->current_year && $row['semester'] == $this->semester_number)) ? true : false; $options['skip'] = FALSE; // Initialize relevant course details. $course = array( 'id' => $row['CourseNum'], 'title' => $this->clean_course_title($row['coursetitle']), 'url' => $this->course_path . '?coursenum=' . $row['CourseNum'], 'credits' => '', 'other' => '', 'schedule_year' => '', 'schedule_day' => '', 'schedule_time' => '', 'instructor' => '', 'second_instructor' => '', 'room' => '', 'limits' => '', ); if (!empty($options['show_curriculum'])) { if ($row['sec_instructor'] == -1) { $second_instructor .= '' . $row['LName'] . ''; $options['skip'] = TRUE; } // TODO: Verify why this is needed if (!in_array($row['coursetitle'], $other_classes)) { array_push($other_classes, $row['coursetitle']); } array_push($crns, $row['CRN']); // NOTE: Not sure if uses. // Extra info for title $course['other'] = 'CRN: ' . (((strlen($row['CRN']) == 5) && (substr($row['CRN'],0,1) == 2 or substr($row['CRN'],0,1) == 6 or substr($row['CRN'],0,1) == 9)) ? $row['CRN'] : 'TBD'); if (!empty($row['CourseNum'])) { $course['other'] .= '
' . $row['CourseNum']; } // Hide icons $course['other'] .= strtolower($row['cardin']?? "") == 'yes' ? '
' . self::$icons['cardin'] . 'Satisfies Cardin Requirement' : ''; $course['other'] .= substr(strtolower($row['cert']?? ""), 0, 3) == 'yes' ? '' . self::$icons['writing'] . 'May satisfy Advanced Writing Requirement' : ''; // Credits $course['credits'] = 'Credits: ' . $row['CuCredit']; if ($row['year'] >= $this->current_year && ($row['courseType'] == "Required" or $row['cr_nc'] == "NO")) { $course['credits'] .= '
' . self::$icons['credit'] . 'Not Eligible for Credit/No Credit (' . $row['courseType'] . ') '; } // Schedule $course['schedule_year'] = $options['semester'] . (!empty($row['year']) ? ' \'' . substr($row['year'], -2) : ''); $course['schedule_day'] = $row['timesched']; $course['schedule_time'] = $row['day_time1'] . '
' . $row['day_time2']; if($row['year'] < $this->current_year) { $course['schedule_day'] = 'Not currently scheduled.'; $course['schedule_time'] = ''; } // Instructor // TODO: Double check $second_instructor functionality.... $course['instructor'] = ''; if ($row['year'] >= $this->current_year) { $course['instructor'] = '' . $row['LName'] . ''; if (empty($options['skip']) && !empty($second_instructor)) { $course['second_instructor'] = $second_instructor; $second_instructor = ""; } } // Room $course['room'] = ''; if ($row['year'] >= $this->current_year) { $course['room'] = $row['room']; } // Limits $course['limits'] = ''; // 1 if ($options['expire_time'] >= $options['today_time'] && is_numeric($row['banner_enrollment'])) { // Check if enrollment limit is numeric : 2 if (is_numeric($row['enrolimit'])) { $options['seats_count'] = $row['enrolimit'] - $row['banner_enrollment']; // Check if (enrollment limit minus banner enrollment) is greater than 0 : 3 if($options['seats_count'] > 0) { $options['seats_available'] = "0 openings."; } else if ($options['seats_count'] == 1) { // Check if (enrollment limit minus banner enrollment) is equal to 1 : 33 $options['seats_available'] = "1 opening."; } else { // 33 $options['seats_available'] = $options['seats_available'] . " opening."; } } else { // 22 $options['seats_available'] = $row['banner_enrollment'] . " enrolled. Limit: " . $row['enrolimit']; } // 4 if($options['today_time'] >= strtotime(self::$dateDropAdd)) { // 5 if($row['banner_enrollment'] == 0) { // 6 if (($row['schedtype'] == '7') && ( ($options['sims_semester_code'] = "02" && $this->today > self::$dateSpringEndClinicDropAdd) || ($options['sims_semester_code'] = "06" && $this->today > self::$dateSpringEndClinicDropAdd) || ($options['sims_semester_code'] = "09" && $this->today > self::$dateSpringEndClinicDropAdd) )) { // TODO: Verify nothing is adjusted here? } else { // 66 $options['seats_available'] = $options['seats_available'] . " Waitlisted."; } } // 55 else { if (($row['schedtype'] == '7') && ( ($options['sims_semester_code'] = "02" && $this->today > self::$dateSpringEndClinicDropAdd) || ($options['sims_semester_code'] = "06" && $this->today > self::$dateSpringEndClinicDropAdd) || ($options['sims_semester_code'] = "09" && $this->today > self::$dateSpringEndClinicDropAdd) )) { $options['seats_available'] = $options['seats_available'] . "Faculty permission required to add or drop."; } else { $options['seats_available'] = $options['seats_available'] . " Waitlisted."; } } } else { // 44 // TODO: Verify nothing is adjusted here? } } if (is_numeric($row['enrolimit']) && is_numeric($row['banner_enrollment'])) { if($row['banner_max'] == 0){ $options['seats_available'] = "Waitlisted. (Limit " . $row['enrolimit']."). "; } else { $options['seats_count'] = $row['banner_max'] - $row['banner_enrollment']; if ($options['seats_count'] == 1){ $options['seats_available'] = $options['seats_count']." opening. (Limit " . $row['banner_max']."). "; } else if ($options['seats_count'] < 1) { $options['seats_available'] = "0 openings. (Limit " . $row['banner_max']."). "; } else { $options['seats_available'] = $options['seats_count'] . " openings. (Limit " . $row['banner_max'] . "). "; } } } else { // If not banner_max not numeric then display enrolimit if ($row['enrolimit'] == ""){ // display nothing } else { $course['limits'] .= "Limit: " . $row['enrolimit']; } } if (!is_null($row['CRN'])) { if ($options['expire_time'] > $options['today_time']) { $course['limits'] .= $options['seats_available']; if (!is_null($row['acadyear']) && ($row['courseType'] != "Elective")) { $course['limits'] .= ' ' . $row['courseType']; } } } if (!empty($row['acadyear'])) { $course['limits'] .= ' ' . $row['acadyear']; } } else { if ((!in_array($row['coursetitle'],$other_classes)) && (empty($this->current)) && (empty($this->openings)) && (empty($this->credit_hours)) && (!in_array($row['CRN'],$crns))) { $options['skip'] = FALSE; // TODO: Verify why this is needed array_push($crns,$row['CRN']); if (!in_array($row['coursetitle'], $other_classes)) { array_push($other_classes, $row['coursetitle']); } if (!empty($row['CourseNum'])) { $course['other'] = '
' . $row['CourseNum']; } $course['limits'] = ''; $course['instructor'] = ''; $course['room'] = ''; if (!empty($row['CoCredit'])) { $course['credits'] = 'Credits: ' . $row['CoCredit']; } if (!empty($options['semester']) && !empty($row['year'])) { $course['limits'] = 'Not currently scheduled.
Last offered ' . $options['semester'] . ' ' . $row['year']; } } else { $options['skip'] = TRUE; } } if (!$options['skip']) { $course['data'] = $row; // Add row data to course array $course['options'] = $options; $courses[] = $course; } } return !empty($courses) ? $courses : ''; } function get_search_results_conditions() { $conditions = ''; // Keyword Search if(!empty($this->keyword)) { $conditions .= " AND lower(co.coursetitle) like '%" . strtolower($this->keyword?? "") . "%'"; } // Faculty Search if(!empty($this->faculty)) { $conditions .= " AND cu.faculty = '" . strtolower($this->faculty?? "") . "'"; } // Subject Search if(!empty($this->subject_area)) { $conditions .= " AND co.CourseSub" . $this->subject_area . " = -1"; } // Instruction Type Search if(!empty($this->instr_type)) { $conditions .= " AND cu.SchedType = CONVERT(NVARCHAR(50)," . $this->instr_type . ")"; // $conditions .= " AND cu.schedtype =" . $this->instr_type . " "; } // Search Semester and Year if(!empty($this->current)) { $search = explode(" ", $this->current); // $search[0] is the semester and $search[1] is the year passed in the url. switch(strtolower($search[0]?? "")) { case "fall": $conditions .= "AND cu.semester=2 AND cu.year=" . $search[1] ; break; case "spring": $conditions .= "AND cu.semester=1 AND cu.year=" . $search[1]; break; case "summer": $conditions .= "AND cu.semester=3 AND cu.year=" . $search[1]; break; } } // Day Offered if(!empty($this->weekday)) { switch($this->weekday) { case "Mon": case "mon": $conditions .= "AND (cu.day_time1 LIKE '%Mon%' OR cu.day_time2 LIKE '%Mon%')"; break; case "Tues": case "tues": case "Tue": case "tue": $conditions .= "AND (cu.day_time1 LIKE '%Tue%' OR cu.day_time2 LIKE '%Tue%')"; break; case "Wed": case "wed": $conditions .= "AND (cu.day_time1 LIKE '%Wed%' OR cu.day_time2 LIKE '%Wed%')"; break; case "Thu": case "thu": case "Thur": case "thur": $conditions .= "AND (cu.day_time1 LIKE '%Thu%' OR cu.day_time2 LIKE '%Thu%')"; break; case "Fri": case "fri": $conditions .= "AND (cu.day_time1 LIKE '%Fri%' OR cu.day_time2 LIKE '%Fri%')"; break; case "Sat": $conditions .= "AND (cu.day_time1 LIKE '%Sat%' OR cu.day_time2 LIKE '%Sat%')"; break; } } // Time Offered Search if(!empty($this->schedule)) { switch($this->schedule) { case "Day": $conditions .= "AND (lower(cu.timesched)='twilight' or lower(cu.timesched)='day')"; break; case "Evening": $conditions .= "AND (lower(cu.timesched)='twilight' or lower(cu.timesched)='evening')"; break; case "N/A": $conditions .= "AND (lower(cu.timesched)='n/a')"; break; } } // Credit Hours Search if(!empty($this->credit_hours)) { $conditions .= "AND cu.Hide = 0 AND (cu.credit like '" . $this->credit_hours . "%' or cu.credit like ' " . $this->credit_hours . "%')"; } if(!empty($this->cardin_req)) { $conditions .= " AND cu.Hide = 0 AND cu.Cardin = 'YES' "; } if(!empty($this->advanced_writing_req)) { $conditions .= " AND cu.Hide = 0 AND cu.Cert like 'YES%' "; } if(!empty($this->openings)) { $conditions .= " AND cu.opennings is not NULL and cu.opennings >0"; } return $conditions; } function get_faculty_options() { $options = []; $sql = "Select DISTINCT tblfaculty.facultynum,tblfaculty.Lname,tblfaculty.Fname from tblCurriculum INNER JOIN tblfaculty ON tblCurriculum.faculty=tblfaculty.facultynum WHERE "; switch($this->current_month) { case 1: case 2: case 3; $sql .= "tblCurriculum.year='" . $this->current_year . "' AND semester=1"; break; case 4: case 5: $sql .= "(( tblCurriculum.year='" . $this->current_year . "' AND tblCurriculum.semester=1) OR ("; $sql .= " tblCurriculum.year='" . $this->current_year . "' AND tblCurriculum.semester=3) OR ("; $sql .= " tblCurriculum.year='" . $this->current_year . "' AND tblCurriculum.semester=2) OR ("; $sql .= " tblCurriculum.year='" . $this->next_year . "' AND tblCurriculum.semester=1)) "; break; case 6: case 7: case 8: $sql .= "(( tblCurriculum.year='" . $this->current_year . "' AND tblCurriculum.semester=3) OR ("; $sql .= " tblCurriculum.year='" . $this->current_year . "' AND tblCurriculum.semester=2) OR ("; $sql .= " tblCurriculum.year='" . $this->next_year . "' AND tblCurriculum.semester=1)) "; break; case 9: case 10: case 11: case 12: $sql .= "(( tblCurriculum.year='" . $this->current_year."' AND tblCurriculum.semester=2) OR ("; $sql .= " tblCurriculum.year='".$this->next_year."' AND tblCurriculum.semester=1)) "; break; } $sql .= "and tblfaculty.DisplayOnweb=-1 order by tblfaculty.lname"; $result = $this->pdo->prepare($sql); $result->execute(); while ($row = $result->fetch(PDO::FETCH_ASSOC)) { $options[$row['facultynum']] = $row['Lname'] . ', ' . $row['Fname']; } return $options; } function get_subject_area_options() { $options = []; $result = $this->pdo->prepare("Select CourseSubNum, CourseSub from tblCourseSub where CourseSubNum <> 17 order by CourseSub ASC"); $result->execute(); while ($row = $result->fetch(PDO::FETCH_ASSOC)) { $options[$row['CourseSubNum']] = $row['CourseSub']; } return $options; } function get_instruction_type_options() { $options = []; $result = $this->pdo->prepare("Select SchedTypeNum, SchedType from tblSchedType order by SchedTypeNum ASC"); $result->execute(); while ($row = $result->fetch(PDO::FETCH_ASSOC)) { $options[$row['SchedTypeNum']] = $row['SchedType']; } return $options; } function get_credit_options() { $options = array(); $max = 13; for ($x = 1; $x <= $max; $x++) { $options[$x] = $x; } return $options; } function get_schedule_options() { $options = array( 'Day' => 'Day/Twilight', 'Evening' => 'Evening/Twilight', 'N/A' => 'N/A', ); return $options; } function get_term_options() { $options = array(); switch ($this->current_month) { case 1: case 2: case 3; $options['Current'] = 'Currently Scheduled (Any Semester)'; $options['Spring ' . $this->current_year] = 'Spring ' . $this->current_year; // $options .= ''; // $options .= ''; // $options .= ''; break; case 4: case 5: $options['Current'] = 'Currently Scheduled (Any Semester)'; $options['Spring ' . $this->current_year] = 'Spring ' . $this->current_year; $options['Summer ' . $this->current_year] = 'Summer ' . $this->current_year; $options['Fall ' . $this->current_year] = 'Fall '.$this->current_year; $options['Spring ' . ($this->current_year + 1)] = 'Spring ' . ($this->current_year + 1); // $options .= ''; // $options .= ''; // $options .= ''; // $options .= ''; // $options .= ''; // $options .= ''; break; case 6: case 7: case 8: $options['Current'] = 'Currently Scheduled (Any Semester)'; $options['Summer ' . $this->current_year] = 'Summer ' . $this->current_year; $options['Fall ' . $this->current_year] = 'Fall ' . $this->current_year; $options['Spring ' . ($this->current_year + 1)] = 'Spring ' . ($this->current_year + 1); // $options .= ''; // $options .= ''; // $options .= ''; // $options .= ''; // $options .= ''; break; case 9: case 10: case 11: case 12: $options['Current'] = 'Currently Scheduled (Any Semester)'; $options['Fall ' . $this->current_year] = 'Fall ' . $this->current_year; $options['Spring ' . ($this->current_year + 1)] = 'Spring ' . ($this->current_year + 1); // $options .= ''; // $options .= ''; // $options .= ''; // $options .= ''; // $options .= "Fall"; break; } return $options; } function clean_course_title($title) { $wordDictionary = [ "A "=>"a ", "An "=>"an ", "And "=>"and ", "At "=>"at ", "But "=>"but ", "By "=>"by ", "For "=>"for ", "In "=>"in ", "Into "=>"into ", "Is "=>"is ", "Of "=>"of ", "Off "=>"off ", "On "=>"on ", "Onto "=>"onto ", "Or "=>"or ", "The "=>"the ", "To "=>"to ", "Iii" => "III", "Ii" => "II", "A.m." => "A.M.", "P.m." => "P.M.", "Cls:" => "CLS:", "Els:" => "ELS:", "Hls:" => "HLS:", "Ltp" => "LTP", "Ltp:" => "LTP:", "B.c." => "B.C.", "A.d." => "A.D.", "Lawr" => "LAWR", "Hiv" => "HIV", "Aids" => "AIDS", "U.s." => "U.S.", "Justadvice" => "JustAdvice", "Nepa" => "NEPA", "Ip " => "IP ", " Ai " => " AI ", "Lgbtqi" => "LGBTQI" ]; return ucfirst(strtr(ucwords(strtolower($title), " /-:,)}]({["), $wordDictionary)); } } ?>