title: One line if statement in PHP
body: <p>I'd like to to some thing similar to JavaScript's</p>
  <pre><code>var foo = true;
  foo &amp;&amp; doSometing();
  </code></pre>
  <p>but this doesn't seem to work in PHP.</p>
  <p>I'm trying to add a class to a label if a condition is met and I'd prefer to keep the embedded PHP down to a minimum for the sake of readability.</p>
  <p>So far I've got:</p>
  <pre><code>&lt;?php $redText='redtext ';?&gt;
  &lt;label class=&quot;&lt;?php if ($requestVars-&gt;_name=='')echo $redText;?&gt;labellong&quot;&gt;_name*&lt;/label&gt;
  &lt;input name=&quot;_name&quot; value=&quot;&lt;?php echo $requestVars-&gt;_name; ?&gt;&quot;/&gt;
  </code></pre>
  <p>but even then the IDE is complaining that I have an if statement without braces.</p>