Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why to use double &&

Status
Not open for further replies.

marknav

Programmer
Sep 26, 2002
14
0
0
US
I transfer parameters with:
file.cfm?param=value1&param2=value2
However i noitced an example written this way:
file.cfm?param=value1&&param2=value2

Why to use double && ?

Thank you

 
It shouldn't make a difference -- either is correct, in my opinion. The second example just makes a longer URL with no benefit that I can think of.

Does anyone know a reason why a specific web server would treat these examples differently?
 
Was the example on a webpage (ie - written in HTML)?

It may have been that the author got a little tripped up in how to escape an ampersand.

I can't think of any reason to use
Code:
&&
. Single ampersands are what I've always used, and they have never failed me [wink]

I know
Code:
&&
used to mean "concatenate two strings with a space inserted between them" in some programming languages. But that doesn't seem particularly useful in this instance. Hope it helps,
-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top