Welcome Guest, Not a member yet? Register   Sign In
How do I create line breaks when passing a string into codeigniter's download helper
#2

[eluser]Unknown[/eluser]
Just found the answer so posting solution for anyone else who encounters it ...

the '\r\n' needs to be on double quotes...so corrected code is

Code:
$reportOutput = '';

foreach($data['displayPostingRecords'] as $result)
{
$reportOutput .=  rawurldecode($result['wpPostlink'])." \r\n ";
}

//download the file..
$fileName = 'report-articleBatchID-'.$articleBatchID.'.txt';
$this->load->helper('download');
force_download($fileName, $reportOutput);


Messages In This Thread
How do I create line breaks when passing a string into codeigniter's download helper - by El Forum - 02-10-2012, 07:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB