title: Parse error: syntax error, unexpected T_ENDWHILE
body: <pre><code>&lt;?php get_header(); ?&gt;
  &lt;div id="content"&gt;
  
  &lt;?php if (have_posts()): ?&gt;
  
      &lt;?php $i=0;?&gt;
      &lt;?php while (have_posts()) : the_post(); ?&gt;
      &lt;?php $i++;?&gt;
      &lt;div class="cols"&lt;? if($i%3==0) echo ' style="margin-right:0"';?&gt;&gt;
          &lt;div class="post" id="post-&lt;?php the_ID(); ?&gt;"&gt;
              &lt;?php $thumb=get_post_meta($post-&gt;ID, 'image', true); ?&gt;
              &lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;"&gt;
              &lt;?php if($thumb!=''){
              $thumb = str_replace(get_bloginfo('url').'/','',$thumb);
              ?&gt;
              &lt;img src="&lt;?php bloginfo('template_url');?&gt;/thumb.php?src=&lt;?=$thumb;?&gt;&amp;w=183&amp;h=140&amp;zc=1" class="thumb" alt="&lt;?php the_title(); ?&gt;" /&gt;
              &lt;? } else { ?&gt;
              &lt;img src="&lt;?php bloginfo('template_url'); ?&gt;/images/pic.jpg" alt="" class="thumb" /&gt;
              &lt;? } ?&gt;
              &lt;/a&gt;
  
              &lt;h2 class="title"&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;"&gt;&lt;?php echo cut_string(get_the_title(),30,'...'); ?&gt;&lt;/a&gt;&lt;/h2&gt;
              &lt;p&gt;&lt;?php echo cut_string(get_the_content(),60,'...'); ?&gt;&lt;/p&gt;
              &lt;p class="meta"&gt;
              &lt;?php if(function_exists('the_views')) { ?&gt;
              &lt;span class="views"&gt;&lt;?php the_views(); ?&gt;&lt;/span&gt; &lt;?php } ?&gt;
              &lt;?php comments_popup_link('No Comments', '1 Comment', '% Comments', 'comments'); ?&gt;
              &lt;/p&gt;
              &lt;p&gt;&lt;?php if(function_exists('the_ratings')) { the_ratings(); } ?&gt; &lt;/p&gt;
  
          &lt;/div&gt;&lt;/div&gt;
  
      &lt;?php endwhile; ?&gt;
      &lt;div class="clearfix"&gt;&lt;/div&gt;
      &lt;div class="page_navi"&gt;&lt;?php page_navi();?&gt;&lt;/div&gt;
  
  &lt;?php else: ?&gt;
  
      &lt;div class="post"&gt;
          &lt;h2 class="title"&gt;Not Found&lt;/h2&gt;
      &lt;/div&gt;
  
  &lt;?php endif; ?&gt;
  &lt;/div&gt;
  
  &lt;!-- end content --&gt;
  
  &lt;?php get_sidebar(); ?&gt;
  &lt;?php get_footer(); ?&gt;
  </code></pre>
  
  <p>Parse error:</p>
  
  <blockquote>
    <p>syntax error, unexpected T_ENDWHILE in /home/fakecsc1/domains/jocuri2k.com/public_html/wp-content/themes/Games/index.php on line 36</p>
  </blockquote>
  
  <p>What's the problem with this code? How can I fix it?</p>