<p>I am trying to set a flag to show or hide a page element, but it always displays even when the expression is false. </p>

<pre><code>$canMerge = ($condition1 &amp;&amp; $condition2) ? 'true' : 'false';
...
&lt;?php if ($canMerge) { ?&gt;Stuff&lt;?php } ?&gt;
</code></pre>

<p>What's up?</p>

The value of 'false' is true. You need to remove the quotes:
```
```
$canMerge = ($condition1 && $condition2) ? true : false;
```
```