homepage Welcome to WebmasterWorld Guest from 54.242.231.109
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
How to hide code in php
nicknick




msg:3733711
 5:54 pm on Aug 28, 2008 (gmt 0)

okay this is a stupid question but im stuggling .

/* is in css

but what is it in php ?

 

woofwoof




msg:3733737
 6:23 pm on Aug 28, 2008 (gmt 0)

//this is a single line comment
#this is also a comment

/*
And this is a multi line comment
*/

eelixduppy




msg:3733738
 6:24 pm on Aug 28, 2008 (gmt 0)

These are called comments. There are two types in PHP.

Single-line comments:

# This is a comment
// ...and another

Or multiple-line comments:

/*
Here is some text blah blah
and some more
blah
here
*/


:)

[edit]
beaten to it ;)

nicknick




msg:3733742
 6:26 pm on Aug 28, 2008 (gmt 0)

Thanks

woofwoof




msg:3734018
 1:06 am on Aug 29, 2008 (gmt 0)

probably the only question I could answer on the php board :)

shdwmage




msg:3734623
 7:56 pm on Aug 29, 2008 (gmt 0)

Also if for some weird reason you don't like to use new lines, you can embed a comment into a line by doing:

$expression = /*Why would you ever do this?*/ 'help me';

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved