+ 1
Does the end tag of php needed for a pure php file?
So I ran into a few people who tell me that the end tag in php ?> Is only needed if a developer puts php code in HTML code. Ex: <DOCTYPE! Html> <head> <title><title> </head><body> <body> <p>some text</p> <?php echo'hello'; ?> </body> While in a pure php file Ex: <?php echo'hello';
2 ответов
+ 4
You only need end tag ?>, if the php page end with html code.
- 1
//No you need ?> End tag in pure php file too