title: shortening content of options inside a select tag
body: <p>I need to make <code>&lt;option&gt;</code> content shorter.  </p>
  
  <pre><code>&lt;select id='seltop'&gt; 
  &lt;?php   
  $stmt = $db-&gt;query("select id, title from posts where status not in ('archive') order by date desc");
      while($row = $stmt-&gt;fetch()) {
          if(strlen($row['title'] &gt; 25)) {$title = substr($row['title'], 0, 25) . '. . .';}
          else {$title = $row['title'];}  
          echo "&lt;option&gt;" . $title . "&lt;/option&gt;\n";
      }
  ?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>only first <code>&lt;option&gt;</code> is short (with elipsis).<br>
  all others <code>&lt;option&gt;</code> tags have full length.<br>
  what is wrong ?</p>