title: How to add align (left, center, right) to table inside a loop
body: <p>How to add align to my table loop?</p>
  
  <p>I have code:  </p>
  
  <pre><code>&lt;table width="960px" border="0" cellspacing="0" cellpadding="0"&gt;
    &lt;tr valign=top&gt;  
  &lt;?
  activate ('main/inside');
  $rid = get ('main/inside');
  $l = openFilesList (PAGE, 'id', ASC, 20);
  $i = 0;
  while ($id = readList ($l)) {
  setActive ($id);
  if (!$rid) $rid = _say ('Раздел');
  $q = 0;
  $arr = array('left', 'center', 'right');
  if ($i == 0) echo '&lt;td align='.$arr[$q++].'&gt;';
      ?&gt;
  "some text"
  &lt;?  if ($i++ == 1) {
          echo '&lt;/td&gt;';
          $i = 0;
      }
  }
  if ($i&gt;0) {
  
      echo str_repeat ('', 2-$i);
      echo '';
  }
  
  ?&gt;
  
  &lt;/tr&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>The output should be </p>
  
  <pre><code>... &lt;td align="left"&gt;some text some text&lt;/td&gt;
  &lt;td align="center"&gt;some text some text&lt;/td&gt;
  &lt;td align="right"&gt;some text some text&lt;/td&gt;...
  </code></pre>
  
  <p>but my code does not work properly.</p>