Jump to content

Question about comments


Robby McDonald

Recommended Posts

I have one small question about comments.

 

say you have a code like this

 

<?php 

$lol = 1;
$rofl = 2;
$lmao = 3;
// Above are my variable's 

echo 'this does not get executed because the apostrophy in the comment acts as the start';

?>

 

Now if I wrote this code the apostrophe in variable acts as a quote and does not end until it meets another to end it. Why does this do that? I thought that when you start a comment that whole line gets ignored. 

 

Could this possible be happening because of my text editor( I use textpad )? If so could you recommend a good text editor, thanks.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.