Is there a more elegant way to write this code?
<pre><code>&lt;?php if (!empty($box1) &amp;&amp; !empty($box2)) { echo ' | content here'; } ?&gt;

&lt;?php if (!empty($box1) &amp;&amp; empty($box2)) { echo 'content here'; } ?&gt;
</code></pre>

<p>Basically, I want to get rid of the pipe if box2 is empty. Is there a better way to write this?</p>
