How to comment inside a string in PHP
$var = "a
b ".// I want to comment here but it becomes a string instead."
"c";
echo $var;
Only possible with concatenation and a comment:
$var = "a\n" .
// "b\n" .
"c";
you can also write your code like this. If you want multi line you can use \n
at after string.
$string = 'First';
$string .= 'Comment section ';//this where you can comment
$string .= 'Last';