Commenting out php doesn't work
Permalink
I suspect this is a super simple question, but C5 is not respecting comment characters that I put in a php file. I'm editing a view.php file suppress the label "Tags:" from a Problog list block. When I comment out one line using // or # at the beginning of the line, the line turns gray so it *seems* to be commented out:
But then when I save the file and refresh the page, the block using this php actually displays the comment characters like this: // Tags:
What am I doing wrong? If I completely remove the line, things display how I want them to, but I don't want to make a practice of removing code.
//<b><?php echo t('Tags')?> : </b>
But then when I save the file and refresh the page, the block using this php actually displays the comment characters like this: // Tags:
What am I doing wrong? If I completely remove the line, things display how I want them to, but I don't want to make a practice of removing code.
Try:
Thanks for the suggestion. Tried it but got the same output: // Tags:
<b><?php // echo t('Tags')?> : </b>
You put the // or # in front of the php statement itself (which doesn't necessarily mean the start of a line).
Oh. How could I miss that in my answer?! m(
Thanks for the correction ;)
Thanks for the correction ;)