mfindlay Posted March 14, 2007 Share Posted March 14, 2007 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 More sharing options...
mfindlay Posted March 14, 2007 Author Share Posted March 14, 2007 Bump!!...this is an interesting problem...really... Link to comment https://forums.phpfreaks.com/topic/42670-printing-to-rtf-file/#findComment-207080 Share on other sites More sharing options...
mfindlay Posted March 19, 2007 Author Share Posted March 19, 2007 Bump Link to comment https://forums.phpfreaks.com/topic/42670-printing-to-rtf-file/#findComment-210406 Share on other sites More sharing options...
mfindlay Posted March 19, 2007 Author Share Posted March 19, 2007 anyone! Link to comment https://forums.phpfreaks.com/topic/42670-printing-to-rtf-file/#findComment-210549 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.