Overview
HTML 2 Script Convert is a small tool for web developers that save your time when you need to insert HTML code in script files.
You can convert the HTML source to PHP, ASP, JavaScript, JSP, or Perl.
If needed you can define custom conversion scheme.
Help
Load the HTML code which you'll convert use file->open or paste it from the clipboard (Paste from clipboard-button).
Use the select-box to use your favorite output format (language).
click the convert-button and save (file->save) the output, or copy it to the clipboard (Copy to clipboard-button).
PHP Custom
You can select the output type in the select-box.
- echo - put the code into "echo" commands
- print - use "print" command
- printf - use "printf" for the output
- $array[] - select this if you want to put every line of the source in separate array item
- $var - put the converted output into PHP variable
- \n - check this option to add '\n' to the end of each line
Note that if you choose "$array[]" or "$var" you'll need to provide variable name in the textbox.
Custom setting
This is useful if you want to convert the HTML source in a way not covered by the other converters.
code starts with: tell the converter to add a custom start tag at the top of the converted code
code ends with: tell the converter to add a custom end tag at the end of the converted code
each line starts with: add this code on the beginning of each line
each line ends with: add this code on the end of each line
Replace rules
The program search for all "replace this" and replace it with "with this".
Note
that the "search and replace" is performed in the order they are defined.
Be careful with this, because it can lead to strange errors.