Can't find the syntax error is in my php code
<p>I am trying to create paginated links at the bottom of my Wordpress homepage page. Single posts are exceptions and they need to have "previous" and "next" button at the bottom of the page. But I get a syntax error with my present code:</p>

<pre><code>&lt;nav class="navigation clearfix"&gt;
        &lt;ul class="pager"&gt;
&lt;?php if ( is_singular() ) { ?&gt;
&lt;li class="previous"&gt;&lt;?php next_post_link( '%link', '&amp;larr; %title' ); ?&gt;&lt;/li&gt;
&lt;li class="next"&gt;&lt;?php previous_post_link( '%link', '%title &amp;rarr;' ); ?&gt;&lt;/li&gt;
&lt;?php } else {
global $wp_query;
$big = 999999999; // need an unlikely integer
echo paginate_links( array(
        'base' =&gt; str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
        'format' =&gt; '?paged=%#%',
        'current' =&gt; max( 1, get_query_var('paged') ),
        'total' =&gt; $wp_query-&gt;max_num_pages
) );
?&gt;
    &lt;/ul&gt;
&lt;/nav&gt;
</code></pre>

<p>I can't find any errors. Any ideas?
Thanks</p>