new to php.
I have html code stored in a mysql database. When the query results come up, I would like the html to format naturally in the browser. How do I do this?
cauri
html encoding
Moderator: General Moderators
- no_memories
- Forum Contributor
- Posts: 145
- Joined: Sun Feb 01, 2004 7:12 pm
- Location: New York City
For xhtml:
<?php echo("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
For other html types follow the same rules as above but without the xml. Simply make your doc type so that PhP can recognize and process it.
Don't forget to make your document end with a .php instead of say .html
<?php echo("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
For other html types follow the same rules as above but without the xml. Simply make your doc type so that PhP can recognize and process it.
Don't forget to make your document end with a .php instead of say .html