Re: How to comment out chunk of html/php mixed code?
| From: | Gabriel Guzman | Date: | Mon, 15 Sep 2003 20:08:22 +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-162655@lists.php.net to get a copy of this message | ||
On Monday 15 September 2003 12:59 pm, Wei Wang wrote:
> hi,
>
> 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?
probably the easiest way is to just do this:
<?php /*
your mixed html and php code here
*/ ?>
that way php will take everything inside the <?php ?> tags and comment them
out, regardless of if they are html or php or whatever.
hth,
gabe.