+ 1
When to use php end tag and when not to?
Sololearn teaches to use end tags <?php ?> but in the external courses that am taking, they skip the end tag. 1. Is it applicable to single php statements. e.g. <?php some function()..... and skip end tag 2. Is it valid for multiple php statements. <?php some function ?> <?php another function skip end tag ..
2 Respuestas
+ 2
To my knowledge you only need to end it if your not going to use any other language in the file. So if you want to use just php then you can leave the php tag open but if you use html or something in combination then you need to close the php tag before starting html.
0
thank you.