Enter your Code into the Window below"; $code = $_REQUEST['code']; $method1 = $_REQUEST['method1']; $method2 = $_REQUEST['method2']; } if (isset($_POST['submit'])) { if (!($method1 && $method2)) { if ($method1) { //$code1 = htmlspecialchars(htmlspecialchars($_POST['code'])); //$code2 = nl2br(stripslashes($code1)); $code1 = htmlentities(htmlentities($_POST['code'])); $code2 = stripslashes($code1); $label = "This is your Html-To-Code Conversion - Copy & Paste it into a WEB page to display as non-parsed HTML code."; $x = $x+2; } elseif ($method2) { //$code2 = htmlspecialchars_decode(htmlspecialchars_decode($_POST['code'])); $code2 = html_entity_decode(html_entity_decode($_POST['code'])); $label = "This is your Code-To-Html Conversion - Copy & Paste it into a WEB page to display as non-parsed HTML code."; $x = $x+1; } else { $code = ""; $code2 = "Please select a Conversion type and press 'Convert Code'."; $label = "None of the 2 conversions were exectued"; $x = $x+1; } } else $label = "You cannot select both options. - Start Over"; } ?> The HTML Code Converter by HALO-Photographs
HALO-Photographs   View some Panoramas

The HTML Code Converter

Convert your code to 'friendly' HTML entities. As a result WEB Browsers will not parse the converted code, instead this code is ready to display on web pages.
Also this tool provides the option to convert code vice-versa.

Examples: convert code from <head> to &lt;head&gt; or vice-versa convert from preformatted code to HTML.
This tool uses the following php string functions with default values: htmlentities, html_entity_decode and stripslashes.

/>
/>

Start Over for subsequent Converions"); ?>

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Switzerland License.
View some Panoramas   HALO-Photographs