i have code works fine prints out table elements. don't know how fix it. thanks <?php // output headers file downloaded rather displayed header('content-type: text/csv; charset=utf-8'); header('content-disposition: attachment; filename=deferred_doc.csv'); // create file pointer connected output stream $output = fopen('php://output', 'w'); // output column headings fputcsv($output, array('app number', 'spoc assigned', 'borrower name', 'app_finish_date','developer & project', 'collateral address details' ,'original_deadline', 'deferred type','deferred_document','spoc remarks', 'juw-ma remarks', 'cosu remarks','file location','smu notes','date completed','submitted/pending','id')); // fetch data mysql_connect('xxxx', 'xxxx', 'xxx'); mysql_se...