Jump to content

Printing to rtf file


mfindlay

Recommended Posts

Hi I am trying to print some results from an array to a rtf file using a template:

 

so in my template I have:

<<num1>>:<<val1>>.....

<<numn>>:<<valn>>.....

 

I have a simple peice of code:

foreach ($typea as $num => $val)
{
$output = str_replace('<<num>>' , $num , $output);
$output = str_replace('<<val>>' , $val , $output);
}

 

All that happens is the first value for $num and $val are inserted into all of the occurences of <<num>> and <<val>> in my rtf file. Any ideas why the loop is not working? or is this something I can't do when printing to file.

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/42670-printing-to-rtf-file/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.