Either (a) you have a parse error but display_errors is turned off, so you do not see the relevant error message; or (b) there is some logic error.
If (a), you need to either check your PHP and/or webserver error logs to see what error is being generated, or change you PHP settings via php.ini or a local config file (e.g.: .htaccess) to turn on display_errors.
If (b), you either need to show us the code, or hope someone here with ESP or divine inspiration will somehow miraculously figure out where the error is.