Title: Weird ENDWHILE Parse Error
Last modified: August 19, 2016

---

# Weird ENDWHILE Parse Error

 *  [gtothab](https://wordpress.org/support/users/gtothab/)
 * (@gtothab)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/weird-endwhile-parse-error/)
 * Hi,
 * I’m getting a message saying “syntax error, unexpected T_ENDWHILE” but I’ve been
   over the code a thousand times and I just can’t find where I have any mismatched
   whiles or ifs. It’s coming from my page.php but as far as I can tell, all my 
   ifs and whiles are properly closed!!! PLEASE HELP ME!!!
 * Thx. Here’s the code:
 * _[Code moderated as per the [Forum Rules](http://wordpress.org/support/topic/68664).
   Please use the [pastebin](http://wordpress.pastebin.ca/)]_

Viewing 1 replies (of 1 total)

 *  [azgard](https://wordpress.org/support/users/azgard/)
 * (@azgard)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/weird-endwhile-parse-error/#post-1478382)
 * In my case the issue was with php code surrounded by <? ?> instead of <?php ?
   >. When I changed the surrounding escape markers with the latter ones everything
   started working correctly.

Viewing 1 replies (of 1 total)

The topic ‘Weird ENDWHILE Parse Error’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [azgard](https://wordpress.org/support/users/azgard/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/weird-endwhile-parse-error/#post-1478382)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
