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
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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.