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

[eluser]Unknown[/eluser]
How do I create line breaks when passing a string into codeigniter's download helper. I have tried the code below which succesfully downloads the file and the string but it just outputs directly the \r\n rather than converting them into new lines. Any help would be greatly appreciated:

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:11 AM



Theme © iAndrew 2016 - Forum software by © MyBB