Use a class, call the function, set two variables:
$this->top_output = $top;
$this->bottom_outpupt = $bottom;
Then echo the top, then go down the page and echo the bottom. Or use sessions, or just use two variables and forget the function.
Either way you have to run the code first to get your value, then just store your bottom output in another variable to display later.