If an expression extending beyond includes?

I have an index.php page and there is a lot to it. How can I make the if statement from the first include continue to the last include without receiving a Parse error: syntax error, unexpected error $ end.

Thank!

+3
source share
1 answer

You can not. However, you can put things inside the if statement in your own file and include it in the if statement as follows:

if(...) {
   include 'file1.php';
}
+2
source

Source: https://habr.com/ru/post/1749206/


All Articles