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

Indicate space

Status
Not open for further replies.

antonherer

Technical User
Oct 11, 2002
7
US
I am sort of half-assedly putting together a search function to search only specified keywords on a site and I need to know how to indicate a space in the code. The line in question looks like this: <cfif string_array[counter]=&quot; &quot;>. What do I put between the quote marks so ColdFusion will look for a space in the string?
 
If your search mechanism is using the URL query string to pass the search phrase, it's probably getting URLEncoded.

So... you'd either need to compare against the URLEncoded space character:
Code:
&quot;%20&quot;
or you'd need to URLDecode the search phrase before comparing:
Code:
<CFSET sSearchPhrase = URLDecode(URL.searchbox)>
then you can look for a regular space
Code:
&quot; &quot;


-Carl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top