echo/printf vs. ending php brackets?
<p>Very simple question, requiring a very simple answer.</p>

<p>If I've got some PHP files that need to output a decent amount of html with variables, is it considering better to use echo/printf or is it better to end the php and start it up again?</p>

<p>ex:</p>

<pre><code>&lt;?php
$varA = 'foo';
$varB = 'bar';
?&gt;
&lt;span&gt;&lt;?php echo $foo; ?&gt;&lt;/span&gt;
&lt;div&gt;&lt;?php echo 'content ' . $bar; ?&gt;&lt;/div&gt;
&lt;?php
//continue php here
?&gt;
</code></pre>

<p>is that considered better than</p>

<pre><code>&lt;?php
$varA = 'foo';
$varB = 'bar';
printf('&lt;span&gt; . $foo . &lt;/span&gt;');
printf('&lt;div&gt;content ' . $bar . '&lt;/div&gt;');
//continue php here
?&gt;
</code></pre>

<p>or is the latter considered "better", OR is one even considered better than the other, period!?</p>

<p>Thanks!</p>
