newbie...need quick syntax help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pulse88
Forum Newbie
Posts: 1
Joined: Tue Apr 22, 2008 10:09 pm

newbie...need quick syntax help

Post by pulse88 »

Hi all,
I'm fairly new to PHP scripting and to this forum (but I've been looking for places to learn more including this place).

my simple question: (I forget the escape character)
In a PHP statement how do you put in the '//' before letting PHP accept it as another code for comment.

This is the line: echo ("$result_set[$element] <a href = 'http://www.somewebsite.com'> $value </a> <br/>");
Obviously, I can't use the // after http: as PHP will consider that as a comment. I know this is quick but I just can't find it. HELP HELP!

Thanks,
-me

:banghead:
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: newbie...need quick syntax help

Post by Christopher »

PHP will not consider // as a comment if it is between quotes. So "//" will be a string, not a comment.
(#10850)
Post Reply