What I would advise is to capture the output of your reciept into a variable. Assuming that you've got some function calls, maybe even Database request mixed up with some print commands .. Or even some times where you escape out of php (?>). Something like this
<?php $RecieptID = GetRecieptID(); Print "Your reciept number: ".$RecieptID; $SomeVar = Functioncall(); Print "----------------------\n"; // some garbage // Print "You owe me: ".getTotalValue(); ?> And you don't want to run the script multiple times. Do like this: <?php ob_start(); $RecieptID = GetRecieptID(); print "Your reciept number: ".$RecieptID; $SomeVar = Functioncall(); print "----------------------\n"; // some garbage // print "You owe me: ".getTotalValue(); $Data = ob_get_clean(); // or php versions earlier than 4.3: $Data = ob_get_contents(); ob_end_clean(); for ($i=0;$i<3;$i++) print $Data; ?> Hope it helps ! Wouter -----Original Message----- From: Jason Wong [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 30, 2003 1:24 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Output data repeatedly more than once On Tuesday 30 September 2003 18:59, Marek Kilimajer wrote: > Yes, you can. But would not it be smarter to increase the number of > copies in the print dialog? But that would be environmentally unfriendly because it uses more paper ;-) -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* "Do you believe in intuition?" "No, but I have a strange feeling that someday I will." */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php