That works because you switched string delimiters in your variables...
The first one uses single quotes around the whole string and has
internal double quotes; and second has the opposite.

To combine them just remember that you can include the string delimiter
in the string itself just double it... So "this is a string with
""double"" quotes" is fine, just like 'this has ''single'' quotes' is
also fine.  You could make one string out of your two lists by deciding
on the "outer" string delimiter and remembering to double that character
in your string. (So, "this is a string with ""double"" quote and also
'single' quotes" works, as does 'this is a string with "double" quotes
and also ''single'' quotes')

Thanks
        Mark

-----Original Message-----
From: Che Vilnonis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 23, 2007 8:31 AM
To: CF-Talk
Subject: Setting a variable that contains quotes and apostrophes.

I have a list of plant sizes that I want to set to a variable. The list
contains quotes and apostrophes. I can't seem to set the list to a
variable with both. I have to separate them out like so. Is there a way
to combine them?

<cfset sizeList = '4" pot,1 quart,2 quart,1 gal.,2 gal.,3
gal.,2-3",3-4",3-6",4-5",5-6",6-8",8-10",10-12",12-15",15-18",18-24"' />

<cfset sizeList2 = "2-3',3-4',4-5',5-6'" />

Thanks, Che




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Check out the new features and enhancements in the
latest product release - download the "What's New PDF" now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:291818
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to