Unexpected $end
<p>I keep getting a error - Parse error: syntax error, unexpected $end in ...  on line 75, but everything looks fine to me.</p>

<pre><code>&lt;?php get_header(); ?&gt;
            &lt;div id="content-top"&gt;
                &lt;div class="title"&gt;
                    &lt;h2&gt;Welcome!&lt;/h2&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div id="content"&gt;

                &lt;div class="contentbox"&gt;
                    &lt;?php get_sidebar(); ?&gt;
                    &lt;?php if (have_posts()) : ?&gt;

                          &lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

                                &lt;div class="post" id="post-&lt;?php the_ID(); ?&gt;"&gt;
                                    &lt;h2&gt;&lt;a href="&lt;?php echo get_permalink($post-&gt;post_parent); ?&gt;" rev="attachment"&gt;&lt;?php echo get_the_title($post-&gt;post_parent); ?&gt;&lt;/a&gt; &amp;raquo; &lt;?php the_title(); ?&gt;&lt;/h2&gt;
                                    &lt;div class="entry"&gt;
                                        &lt;p class="attachment"&gt;&lt;a href="&lt;?php echo wp_get_attachment_url($post-&gt;ID); ?&gt;"&gt;&lt;?php echo wp_get_attachment_image( $post-&gt;ID, 'medium' ); ?&gt;&lt;/a&gt;&lt;/p&gt;
                                        &lt;div class="caption"&gt;&lt;?php if ( !empty($post-&gt;post_excerpt) ) the_excerpt(); // this is the "caption" ?&gt;&lt;/div&gt;

                                        &lt;?php the_content('&lt;p class="serif"&gt;Read the rest of this entry &amp;raquo;&lt;/p&gt;'); ?&gt;

                                        &lt;div class="navigation"&gt;
                                            &lt;div class="alignleft"&gt;&lt;?php previous_image_link() ?&gt;&lt;/div&gt;
                                            &lt;div class="alignright"&gt;&lt;?php next_image_link() ?&gt;&lt;/div&gt;
                                        &lt;/div&gt;
                                        &lt;br class="clear" /&gt;

                                        &lt;p class="postmetadata alt"&gt;
                                            &lt;small&gt;
                                                This entry was posted on &lt;?php the_time('l, F jS, Y') ?&gt; at &lt;?php the_time() ?&gt;
                                                and is filed under &lt;?php the_category(', ') ?&gt;.
                                                &lt;?php the_taxonomies(); ?&gt;
                                                You can follow any responses to this entry through the &lt;?php post_comments_feed_link('RSS 2.0'); ?&gt; feed.

                                                &lt;?php if (('open' == $post-&gt; comment_status) &amp;&amp; ('open' == $post-&gt;ping_status)) {
                                                    // Both Comments and Pings are open ?&gt;
                                                    You can &lt;a href="#respond"&gt;leave a response&lt;/a&gt;, or &lt;a href="&lt;?php trackback_url(); ?&gt;" rel="trackback"&gt;trackback&lt;/a&gt; from your own site.

                                                &lt;?php } elseif (!('open' == $post-&gt; comment_status) &amp;&amp; ('open' == $post-&gt;ping_status)) {
                                                    // Only Pings are Open ?&gt;
                                                    Responses are currently closed, but you can &lt;a href="&lt;?php trackback_url(); ?&gt; " rel="trackback"&gt;trackback&lt;/a&gt; from your own site.

                                                &lt;?php } elseif (('open' == $post-&gt; comment_status) &amp;&amp; !('open' == $post-&gt;ping_status)) {
                                                    // Comments are open, Pings are not ?&gt;
                                                    You can skip to the end and leave a response. Pinging is currently not allowed.

                                                &lt;?php } elseif (!('open' == $post-&gt; comment_status) &amp;&amp; !('open' == $post-&gt;ping_status)) {
                                                    // Neither Comments, nor Pings are open ?&gt;
                                                    Both comments and pings are currently closed.

                                                &lt;?php } edit_post_link('Edit this entry.','',''); ?&gt;

                                            &lt;/small&gt;
                                        &lt;/p&gt;

                                    &lt;/div&gt;

                                &lt;/div&gt;

                            &lt;?php comments_template(); ?&gt;

                            &lt;?php endwhile; else: ?&gt;

                                &lt;p&gt;Sorry, no attachments matched your criteria.&lt;/p&gt;

                        &lt;?php endif; ?&gt;


                    &lt;div class="clear"&gt;&lt;/div&gt;


                &lt;/div&gt;

            &lt;/div&gt;
</code></pre>

<p></p>
