To embed PHP code inside a file, it has to be inside a special set of opening and closing tags.
PHP supports the following tags sets:
1. Opening (< ?php) and closing (? >)
2. Opening (< ?) and closing (? >)
3. Opening (< %) and closing (% >)
4. Opening (< script language=”php” >) and closing (< /script >)

Example:

< html >
…..< head >
……….< title >Sample document< /title >
…..< /head >
…..< body >
……….< ?php
...............echo “Sample text”;
..........? >
…..< /body >
< /html >

 


Comments




Leave a Reply

Name (required)
Email (not published)
Website