This is a very common error, typically caused by a missing } used in PHP to denote content belonging to a WHILE, IF, or FOR loop, and it's mostly caused by a wrong indent habit.

it may happen that 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 it's done here:

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

Instead, the best practice is to keep } on its own line, so it can't be wrongly deleted/commented:

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

Found this article interesting?
Subscribe to DomainRegister´s newsletter!

You can unsubscribe at any time by simply clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp s privacy practices here.

  • php
  • 0 uporabniku/om je bi članek v pomoč
Vam je bil odgovor v pomoč?

Povezani članki

 Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): It is not safe to rely on the system's timezone settings.

If you get following error message:Fatal error: Uncaught exception 'Exception' with message...

 How to set php.ini values using .htaccess

You can override global values of system variables re-setting them in .htaccessFor each system...

 How to send mails through your website

On shared web hosting server for security reasons it's not possible unauthenticated email sending...

 allow_url_fopen

If enabled, allow_url_fopen allows PHP's file functions (such as file_get_contents() and the...

 Limiti funzione php mail()

per motivi di sicurezza sui nostri server di hosting shared Linux la funzione php mail() è...