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 Utenti hanno trovato utile questa risposta
Hai trovato utile questa risposta?

Articoli Correlati

 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...

 Come inviare email dal proprio sito

Sui server di web hosting shared (condiviso), per motivi di sicurezza non è possibile l'invio di...

 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() è...