A comment on comments.

In the "you learn something new every day" category, comes this.

In the "you learn something new every day" category, comes this. I just found out that when working with php, you can use block commenting (like /*this*/) in the middle of a line of code. For example, if you have something like this:

$debug = 'really cool ';
echo 'This is my '.$debug.'script!';

... you can remove your debug display by commenting it out mid-line like this:

$debug = 'really cool ';
echo 'This is my './*$debug.*/'script!';

Now, this may already be obvious to everyone else, but I thought this was pretty handy to know.


No comments on ‘A comment on comments.’

Comments are closed

Comments on this post have been closed. If you would like to contact me about this post or for any reason, please get in touch.