1. turn on ob (output buffering at the top of the script
2. where you want the counter to be, echo something unique like [EMAIL PROTECTED]@
3. once the script has ended flush the contents of OB into a variable like $obContents
4. do a str_replace('[EMAIL PROTECTED]@',$yourCounterValue, $obContents)
5. echo the $obContents to the screen
I think a smarter way would be to re-organise your code somehow so that it does what you want, but maybe that can't be done (no way to know without seeing the code).
Good luck,
Justin French
On Monday, August 4, 2003, at 01:04 PM, Micah Montoy wrote:
Anyone know of a way to use a variable that isn't defined until further down
the script at the top. I have a counter and once everything runs through
the script, the count is complete, I need to display this at the top above
the displayed results. I thought about and tried a function but I still run
into the same problem.
thanks
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php