which one is better in printing out a function output in php?
<p>In PHP, i have a function that fetch some data from database and output them.<br>
Which one is better ?</p>

<ol>
<li><p>store output in a variable, for example <code>$output</code> and <code>echo $output</code> at the end of the function </p>

<p>OR </p></li>
<li><p>echo data instead of putting in <code>$output</code>, this causes having more than one echo statement.</p></li>
</ol>
