Jump to content

Making notes in a PHP file


leeandrew

Recommended Posts

I've seen notes in files along the way and just usually deleted them.

 

I have a file right now thats getting kind of clogged and messy, it'd be great if i could put some 'invisible notes' in it a various points so i can keyword search them to save time.

 

I've seen a method like this work...

 

// write your note here

But i cant get it to work within echo statements

 

Are there any other note codes i can try

Link to comment
https://forums.phpfreaks.com/topic/95753-making-notes-in-a-php-file/
Share on other sites

Those "notes" are usually reffered to as "comments"  I'm not exactly sure what you mean by invisible notes but you can also use any of the following syntax..

 

// use this to comment out one line

####  These also work and stand out a little

 

/* or you can do this and

comment

out a

few lines

at a time */

 

Does that help?

You can't put comments in an echo statement. That's sent as-is.

 

ex;

 

echo "This is a test //Hidden stuffs!";

 

That's printed out directly.

 

echo "This is a test <!-- Hidden Stuffs! -->";

 

Would be the proper way to "hide" it in the browser. See the above post for putting comments inside the code itself.

Archived

This topic is now archived and is 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.