|Parsing mixed HTML and PHP [message #557492]
||Tue, 07 September 2010 18:11
| John Sutton
Registered: September 2010
I've got a file which contains *mostly* html but some php such as in:|
<a href="<?php echo $linkref ?>">Click here</a>
, the usual kind of stuff. Now, if I play around with the extension of the file and the associated Preferences/General/Content Types and Preferences/General/Editors/File Associations then I can achieve either of 2 results, neither of which is totally satisfactory:
1) the editor will treat the file as HTML and will mark the above line as an error - "Start tag (<a>) not closed" because it trips over the php opening tag, but on the other hand it makes a good job of spotting any *real* HTML coding errors;
2) the editor will treat the file as PHP in which case the line above is
parsed as valid BUT I get no help with spotting *real* HTML errors.
In the "File Association" preference referred to above, you can set an
"Associated editor" as Default, but I can't work out what (if anything) this
Have I missed something? How do other people cope with this problem?
Powered by FUDForum
. Page generated in 0.01923 seconds