I have a templet in word (*,rtf) that I am using for printing of some data. However when I pass string with "\n" character word ignores it. Here is the code.
[PHP]header('Content-Type: application/msword'); header('Content-Disposition:
attachment, filename=firma. rtf');
$file_doc = "firma.rtf" ;
$output = file_get_conten ts($file_doc);
$firma = $_GET['firma'];
$txt = $_GET['txt'];
$output = str_replace("<< firma>>", $firma, $output);
$output = str_replace("<< txt>>", $txt, $output);
echo $output;
?>
[/PHP]
$txt becomes something like this "blah blah blah \n blah blah" but word ignores \n and word prints:
"blah blah blah blah blah"
instead of
"blah blah blah
blah blah"
Thanks guys
[PHP]header('Content-Type: application/msword'); header('Content-Disposition:
attachment, filename=firma. rtf');
$file_doc = "firma.rtf" ;
$output = file_get_conten ts($file_doc);
$firma = $_GET['firma'];
$txt = $_GET['txt'];
$output = str_replace("<< firma>>", $firma, $output);
$output = str_replace("<< txt>>", $txt, $output);
echo $output;
?>
[/PHP]
$txt becomes something like this "blah blah blah \n blah blah" but word ignores \n and word prints:
"blah blah blah blah blah"
instead of
"blah blah blah
blah blah"
Thanks guys
Comment