Re: How to comment out chunk of html/php mixed code?
| From: | Eugene Lee | Date: | Mon, 15 Sep 2003 20:13:46 +0000 |
| Subject: | Re: How to comment out chunk of html/php mixed code? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-162657@lists.php.net to get a copy of this message | ||
On Mon, Sep 15, 2003 at 08:59:53PM +0100, Wei Wang wrote:
:
: This may sound very newbie. But since html comment uses <!-- -->
: which doesn't comment out the php code. And the php comment /**/ //
: apparently doesn't work on html. So how do I comment out a chunk of
: html/php mixed code?
Remove the chunk of mixed code and save it into an external PHP file,
e.g. mixed_code.php. In place of removed chunk, use an include() or
require() statement, e.g. include("mixed_code.php"). Now comment
that one line in or out as needed.