I tried this same coding in several ways, and none of them work.
public function getCalendarById($calendarId)
{
$calendarsList = $this->getCalendarsList();
if($calendarId == "1") {
return $this->getMergedCalendars();
} else {
return (array_key_exists($calendarId, $calendarsList) ? $calendarsList[$calendarId] : null);
} else {//******** error here ***********
return (array_key_exists($calendarId, $calendarsList) ? $this->holidayrize($calendarId) : null);
}
}
The error happens in the commented line. It says Unexpected T_ELSE
Any ideas why?