Tool I made that you might find handy
Posted: Fri Jan 02, 2009 9:22 pm
Hi,
I'm new to the forums (first post!) and after all the help I've gotten from reading posts on various php programming communities, I thought I'd give a little something back to you guys. (Hopefully I'm posting this to the right forum)

This tool turns your PHP files into HTML files that WYSIWYG editors can more easily handle - while still allowing your PHP code to execute. Any <?php ?> blocks you have in your file will have comments applied in such a way that web page editors will embed your php code as an HTML comment inside text that says "
Will be saved like:
To a web page editor or browser opening as a .html it will look like:
I'm new to the forums (first post!) and after all the help I've gotten from reading posts on various php programming communities, I thought I'd give a little something back to you guys. (Hopefully I'm posting this to the right forum)

This tool turns your PHP files into HTML files that WYSIWYG editors can more easily handle - while still allowing your PHP code to execute. Any <?php ?> blocks you have in your file will have comments applied in such a way that web page editors will embed your php code as an HTML comment inside text that says "
Code: Select all
".
[img]http://www.problemsolvedcomputing.com/nchotspot/PHPToValidHTML/wysiwyg%20view.jpg[/img]
For example, some simple inline PHP with HTML inline:Code: Select all
<p><b>Record Label: </b><?php echo $RecordLabel; ?></p>Code: Select all
<p><b>Record Label: </b>[<!--<?php echo "-"."->"; echo $RecordLabel; echo "<!-"."-";?>-->PHP] </p>Record Label:Code: Select all
[/quote] To a web browser opening from a server that used the PHP interpreter on the file: [quote]Record Label: [Universal MusicPHP][/quote] You can easily convert back and forth between .php and .php.html files. So for instance if you're using Eclipse for PHP coding and wanting to use Dreamweaver for laying out the HTML thats embedded in the PHP file, this tool should make that a snap. Well, hope you guys enjoy. Let me know if there's other sites you think would like to have this posted to.