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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert Underscore In Variable To Space

Status
Not open for further replies.

rmz8

Programmer
Aug 24, 2000
210
US
Hey,

What is the easiest, most effective way to alter a variable passed by the URL parameter so that if it is 'Top_Level' it can be changed to 'Top Level'? Essentially, I need to convert an underscore in a variable to a space.

Thank you in advance. [sig]<p>Ryan ;-]<br>[/sig]
 
Try:
<cfset URLVar = Replace(URLVar,'_','','all')>

You may consider using:
#URLEncodedFormat(&quot;yoursit?URLVar=Top Level&quot;)#

Then Cold Fusion will insert the %20 and you won't have to fix it later.


 
How exactly do I implement the following line that you provided?

#URLEncodedFormat( [sig]<p>Ryan ;-]<br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top