$name ) { $result[] = array( 'full_date' => $name, 'events' => $titles[$key], 'holiday' => $descriptions[ $key ] ); } return $result; } $word) { if($key != 0 && $key != 1) $temp[] = $word; } $text = implode(' ', $temp); $text = explode('[', $text); return $text[0]; } //function for exporting excel file function exportToExcel($records) { $heading = false; if(!empty($records)) foreach($records as $row) { if(!$heading) { // display field/column names as a first row echo implode("\t", array_keys($row)) . "\n"; $heading = true; } echo implode("\t", array_values($row)) . "\n"; } exit; } > >