Welcome to WebmasterWorld Guest from 54.167.22.37

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How to hide code in php

     

nicknick

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

5+ Year Member



okay this is a stupid question but im stuggling .

/* is in css

but what is it in php ?

woofwoof

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

10+ Year Member



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

/*
And this is a multi line comment
*/

eelixduppy

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

WebmasterWorld Senior Member eelixduppy is a WebmasterWorld Top Contributor of All Time 5+ Year Member



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

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

5+ Year Member



Thanks

woofwoof

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

10+ Year Member



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

shdwmage

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

5+ Year Member



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';

 

Featured Threads

Hot Threads This Week

Hot Threads This Month