I am able to populate an rtf file with preset variables:
<?
header('Content-Type: application/msword');
header('Content-Disposition: inline, filename=file_to_download.rtf');
// open template file:
$filename = 'rtf_template.rtf';
$output = file_get_contents($filename);
$output = str_replace('<<STUFF>>', $var, $output);
// send the generated doc to the browser
echo $output;
?>
I am replacing <<STUFF>> with $var. Here's the thing, $var is not just a word or small sentence. It's a paragraph. It does indeed show up on the rtf file, but there are no breaks where the enter button was used. Showing the information via the browser is just fine.
Anyone know why this may happen?
thanks!