Title: Parse error: syntax error, unexpected &#039;clear&#039; (T_STRING), expecting &#039;,&#039; or &amp;#039
Last modified: August 21, 2016

---

# Parse error: syntax error, unexpected 'clear' (T_STRING), expecting ',' or &#039

 *  [umairi](https://wordpress.org/support/users/umairi/)
 * (@umairi)
 * [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/)
 * i edited functions.php and add some pagination code to it and press upgrade button
   then i found this error
    Parse error: syntax error, unexpected ‘clear’ (T_STRING),
   expecting ‘,’ or ‘;’ in /home4/raza/public_html/easytipstricks/wp-content/themes/
   goodnews47/functions.php on line 22 please help me to solve this issue

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [bastetmilo](https://wordpress.org/support/users/bastetmilo/)
 * (@bastetmilo)
 * [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/#post-4953957)
 * Can you show us the code you’ve inserted in functions.php?
 *  Thread Starter [umairi](https://wordpress.org/support/users/umairi/)
 * (@umairi)
 * [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/#post-4953959)
 * i removed the code that time but still showing this error.actually i was searching
   about pagination code and i found then i inserted that code in functions.php 
   and press the button ..then this error appeared.then i removed that code but 
   still i m facing this issue
 *  Thread Starter [umairi](https://wordpress.org/support/users/umairi/)
 * (@umairi)
 * [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/#post-4953961)
 * i cant accesss my dashboard and site page..
 *  Thread Starter [umairi](https://wordpress.org/support/users/umairi/)
 * (@umairi)
 * [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/#post-4953967)
 * [@bastetmilo](https://wordpress.org/support/users/bastetmilo/) i inserted this
   code for pagination at the end of the functions.php and found above mentioned
   error.and after geeting error i removed this code but issue is not resolved
 * <?php
    function pagination($pages = ”, $range = 4) { $showitems = ($range * 2)
   +1; global $paged; if(empty($paged)) $paged = 1; if($pages == ”) { global $wp_query;
   $pages = $wp_query->max_num_pages; if(!$pages) { $pages = 1; } } if(1 != $pages){
   echo “<div id=”clear”></div><div id=”xs-pagination”>”; if($paged > 2 && $paged
   > $range+1 && $showitems < $pages) echo “[« First](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/".get_pagenum_link(1)."?output_format=md)“;
   if($paged > 1 && $showitems < $pages) echo “[‹ Previous](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/".get_pagenum_link($paged - 1)."?output_format=md)“;
   for ($i=1; $i <= $pages; $i++) { if (1 != $pages &&( !($i >= $paged+$range+1 
   || $i <= $paged-$range-1) || $pages <= $showitems )) { echo ($paged == $i)? “
   <span class=”current”>”.$i.”</span>”:”[“.$i.”](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/".get_pagenum_link($i)."?output_format=md)“;}}
   if ($paged < $pages && $showitems < $pages) echo “Next ›“; if ($paged < $pages-
   1 && $paged+$range-1 < $pages && $showitems < $pages) echo “[Last »](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/".get_pagenum_link($pages)."?output_format=md)“;
   echo “</div>n”; } } ?>
 *  [bastetmilo](https://wordpress.org/support/users/bastetmilo/)
 * (@bastetmilo)
 * [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/#post-4953969)
 * You probably remove too much, or not every piece of code you’ve inserted earlier.
   Show line 22 of your code.
 *  [bastetmilo](https://wordpress.org/support/users/bastetmilo/)
 * (@bastetmilo)
 * [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/#post-4953970)
 * [@umairi](https://wordpress.org/support/users/umairi/) please use pastebin.com
   or `code` tag here for code.
 * You have error here:
    `echo "<div id="clear"></div><div id="xs-pagination">";`
   it should be like that: `echo '<div id="clear"></div><div id="xs-pagination">';`
   Use ‘ instead of “.
 *  Thread Starter [umairi](https://wordpress.org/support/users/umairi/)
 * (@umairi)
 * [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/#post-4953971)
 * no i did not remove to much i removed only this code..and i cant access cntrol
   panel dashboard…can you tell me what is the problem with my site
 *  Thread Starter [umairi](https://wordpress.org/support/users/umairi/)
 * (@umairi)
 * [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/#post-4953973)
 * [@bastetmilo](https://wordpress.org/support/users/bastetmilo/)
    but i removed
   this code from the functions.php..but after removing this code i am still facing
   the same error
 *  [bastetmilo](https://wordpress.org/support/users/bastetmilo/)
 * (@bastetmilo)
 * [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/#post-4953974)
 * [@umairi](https://wordpress.org/support/users/umairi/) did you cleared cache 
   of your browser?
 * And log into your ftp account and check your functions.php file if you really
   remove that code.
 *  Thread Starter [umairi](https://wordpress.org/support/users/umairi/)
 * (@umairi)
 * [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/#post-4953975)
 * no i did not clear my browser cache..now i do…so i check this from ftp account
   on line 22

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Parse error: syntax error, unexpected 'clear' (T_STRING), expecting ','
or &#039’ is closed to new replies.

## Tags

 * [parse-error](https://wordpress.org/support/topic-tag/parse-error/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)
 * [unexpected T_STRING](https://wordpress.org/support/topic-tag/unexpected-t_string/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 2 participants
 * Last reply from: [umairi](https://wordpress.org/support/users/umairi/)
 * Last activity: [12 years ago](https://wordpress.org/support/topic/parse-error-syntax-error-unexpected-clear-t_string-expecting-or/#post-4953975)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
