PHP Parse error: syntax error, unexpected $end

This error is typically caused by a missing } used in PHP to denote content belonging to a WHILE, IF, or FOR loop.

You might accidentally comment out a } when you comment out a line of code. For example:

while (x==y){
do this;
do that;}


If you decide you no longer want to "do that", be very careful to not remove the } as I have done here.


while (x==y){
do this;
//do that;}

Instead, it is better practice to keep } on its own line.

while (x==y){
do this;
//do that;
}
  • PHP, PHP Parse
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I access cPanel?

1. Managing your Linux Hosting package through your web browsercPanel can be accessed by using...

Uploading Content to your cPanel Linux Hosting Package

To upload content to your Hosting package through an FTP client, use only FTPS on Port 21.Some...

SymLinks Settings of cPanel Linux Hosting packages

Linux Hosting packages do not support the "FollowSymlinks" option in the .htaccess file. This...

Directory and File Structure - Linux

Directory/Folder StructureFrom amongst the several directories found within your cPanel account,...

PHP Memory Limit Error

Allowed Memory Size Exhausted Errors Fatal error: Allowed memory size of 12582912 bytes...

Powered by WHMCompleteSolution