using <?php tag | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
0

using <?php tag

the tutorial which introduces the php syntax has the opening tag <?php nested in the body and my editor (phpStorm) has all of my php files using the same tag but at the very beginning of the php file and not in the body. Which location is the right one and does location in this case matter? Is it an either/or situation? What is the best practice?

15th Feb 2017, 2:32 AM
Steven Moss
Steven Moss - avatar
1 Réponse
0
it doesn't matter when you use php in your html tags and codes than you have to define as much time as much place you need to use php. if you need to use php in between you can use there but with php tags.. as as time in as much places in a single page
15th Feb 2017, 5:47 PM
Shiva Bhardwaj
Shiva Bhardwaj - avatar