How can I use conditional logic to not display a  in page.tpl.php based on node id? I'm using a theme that has regions not supported by Panels' "Disable Drupal blocks/regions" settings. I've tried to remove the  using an if statement in PHP, but either my PHP syntax is wrong or I'm not using the correct Drupal variables. Right now the section looks like this:

&lt;?php
    if ($node-&gt;nid != 51) {
        echo '&lt;div id="left"&gt;';
            { if ($left) { print $left;}
        echo '&lt;/div&gt;';
 ?&gt;


I have a feeling I'm not nesting the second if statement correctly in PHP though.
If you're trying to hide the left sidebar when viewing node 51, this is not the right way to do it. Edit the block visibility settings for the blocks in the left sidebar so they are hidden when the path is 'node/51'. Then in your template you can do this:

&lt;?php
  if ($left) {
    print '&lt;div id="left"&gt;' . $left . '&lt;/div&gt;';
  }
?&gt;


This will hide the entire div#left when there are no blocks in the left sidebar.