Drupal6 sidebar code?
Functionality aside, I think the basic structure for D6 would be:

&lt;?php
if(isset($sidebars['left'])):
  foreach($sidebars['left'] as $value):
    if (!empty(${'sidebar_'.$value})): ?&gt;
    &lt;div id="sidebar-&lt;?php echo $value; ?&gt;" class="col-&lt;?php echo $value; ?&gt; sidebar left tb-height-balance tb-region tb-scope tb-sidebar tb-left"&gt;
      &lt;?php print ${'sidebar_'.$value}; ?&gt;
    &lt;/div&gt;
    &lt;?php 
    endif; 
  endforeach; 
endif; ?&gt;