title: How to avoid a Netbeans error with an HTML block nested in PHP if statement
body: <p>Consider the following example:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;td&gt;Row One&lt;/td&gt;
      &lt;/tr&gt;
      &lt;?php
      if ($rowtwo)
      {
      ?&gt;
      &lt;tr&gt;
          &lt;td&gt;Row Two&lt;/td&gt;
      &lt;/tr&gt;
      &lt;?php
      }
      ?&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>If <code>$rowtwo</code> is true, the second row is output, otherwise it is skipped.</p>
  
  <p>The code works as desired, however I am evaluating Netbeans (7 beta) as a PHP IDE (instead of just using a text editor). Netbeans flags the code with an error:</p>
  
  <blockquote>
    <p>Misplaced non-space characters insided
    [sic] a table.</p>
  </blockquote>
  
  <p>Should I consider an alternate way of writing this code, or is Netbeans incapable of understanding this flow control wrapper for HTML output?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>The example does not show the indentation I originally used, however various methods of indentation do not affect Netbeans in flagging it as an error.</p>
  
  <p>Removing whitespace prior to the <code>&lt;?php</code> and <code>?&gt;</code> tags as well as using <code>endif;</code> instead of curly braces both result in the same functionality, but are still flagged.</p>
  
  <p>I think this is a problem and/or weak point with Netbeans' code parsing.</p>