PHP in HTML
Moderator: General Moderators
PHP in HTML
I wanted to put my PHP in my HTML code using the <?php and ?> tags, but the PHP code is very long and has several end (?>) tags in it. Is there a way to wrap the entire php code in one big start and end tags?
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
If I understand what you're saying, you could use the heredoc syntax to output any html that you are printing to the browser without having to escape from php mode (you could also use echo to do this). Also, consider separating your logic and presentation by putting large chunks of HTML into separate files and including those files into the PHP script.