0

I have four files. (1) example.php (2) file1.php (3) file2.php (4) example2.php

This file example2.php works fine. It works fine.

But, when if else code is written into separate files and is included on top and bottom of the document, it does not work and throw error "syntax error, unexpected end of file".

example.php is the file with includes

Include files are

file1.php and file2.php

Please suggest what is the problem, I did not find any answer regarding this.

  • [Why not upload images of code/errors when asking a question?](//meta.stackoverflow.com/q/285551) – mario Jan 24 '21 at 19:34
  • Code blocks `{`…`}` can't be dispersed across different files. – mario Jan 24 '21 at 19:35
  • Thanks a lot for your valuable suggestion. I understood that {…} can't be dispersed across different files. But what is it's solution? It appears that this code I to write in the same file, but that creates problem for me as I have to implement same code in many of the files. Ok I see for different solution. – sanjay sharan Jan 26 '21 at 08:52

0 Answers0