{ $temp = array(); foreach ($strArray as $value) { $hold = strlen($value) > 15 ? substr($value, 0, 15) . "........ .... ." : $value; array_push($temp, $hold); } return $temp; } /* ---------- for Date into word ---------------- */ public function getDate($T_Date) { $t_month; $t_day; $t_year; $concatDate = ""; $temp_date = explode("-", $T_Date); $t_year = trim($temp_date[0]); $t_month = trim($this->convertMonth(trim($temp_date[1]))); $t_day = trim($temp_date[2]); return $t_month . " " . $t_day . ", " . $t_year; } public function convertMonth($month) { $_month = array("January", "Febuary", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); return $_month[$month - 1]; } } $controller = new bulletin(); $controller->perform_actions(); $controller->display();