Created
June 6, 2014 22:36
-
-
Save ChrisFrench/fb106f3c6e460ec34899 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function doCSV() { | |
$list = (new \Dash\Site\Models\Event\Tags)->populateState()->setCondition('attendee.id', array('$exists' => false))->setCondition('ticket.id', array('$exists' => false))->setCondition('sysgentag',1)->getItems(); | |
$fp = fopen('php://output', 'w'); | |
header('Content-Type: application/excel'); | |
header('Content-Disposition: attachment; filename="emptytags.csv"'); | |
$fp = fopen('php://output', 'w'); | |
foreach ($list as $tag) { | |
$array[0] = 'http://ryst.cc/b/'.$tag->tagid; | |
fputcsv($fp, $array); | |
} | |
fclose($fp); | |
die(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment