Removed JS eventsArray and added PHP one