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.

0 Responses to “A comment on comments.”