- ob_get_clean: documentation ( source)
- ob_start: documentation ( source)
- fputcsv: documentation ( source)
- fclose: documentation ( source)
- fopen: documentation ( source)
<?php
ob_start();
$output = fopen('php://stdout', 'w');
fputcsv($output, array('a' => 1, 'b' => 2));
fclose($output);
echo ob_get_clean();