First my earlier post completely disregarded the fact that you'd have "/"
chars BEFORE the .cfm, so sorry about neglecting that tid bit.

Secondly I'd like to recommend not using so many #'s where they aren't
needed. I've worked the code below to illustrate what I mean. Also, to avoid
#'s on the left hand side of assignment as well as reducing the use of
evaluate I'd recommend using either a struct or an array for storing your
"url_var" vars.

<cfset url_vars = listrest(listlast(cgi.REQUEST_URI, "."), "/\") /> <!---
strips the variables obfuscated as '/' delmited values from the URI string
--->
<cfset ary_vars = ListToArray(url_vars,"/",true) /> <!--- Create array of
vars --->

<!--- below is only used to see output list of created variables; not really
needed to use the variables --->
<cfif ArrayLen(ary_vars)>

<cfoutput>

<cfloop from=1 to=#ArrayLen(ary_vars)# index=i>

Variable#i# = #ary_vars[i]#<br />

</cfloop>

</cfoutput>

<cfelse>
       No / delimited variables found in URL string
</cfif>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339864
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to