How do you comment html templates in Php (in a practical way) ?
- by faB
Is there a simple solution to do the equivalent of Java's comments:
<%-- this is a comment inside a template, it does not appear in the output HTML --%>
Even if you use short php tags, you still have to wrap the comments with comment syntax, on top of the php tags:
<? /* this is a comment of the html template */ ?>
I'm considering doing some kind of filter on the output templates, to remove all html comments, or better yet, custom comments like the Java syntax above, but how would you do that in the most efficient way? You'd have to run a regexp right?
The reason for my question is simply that in a MVC framrwork, using components, and re-usable html templates (think YUI), I need to document clearly those templates, in a readable way..