Halaman Utama > Knowledgebase > General > PHP Parse error: syntax error, unexpected $end


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;
}

 



Apakah Jawaban ini membantu?

Tambahkan ke Favorit Tambahkan ke Favorit    Cetak Artikel Ini Cetak Artikel Ini

Baca Juga
Ticket wait times (Dilihat: 216)
Glossary (Dilihat: 187)
open new Port (Dilihat: 194)

Powered by WHMCompleteSolution