PHP fputcsv May 11, 2012 Pramod T P It format line as CSV and write to file pointer Example <?php $data = array ( array(‘php’, ‘asp’, ‘jsp’, ‘js’)); $fp = fopen(‘test.csv’, ‘w’); foreach ($data as $value) { fputcsv($fp, $value); } fclose($fp); ?>