> -----Original Message-----
> From: Tony [mailto:[EMAIL PROTECTED]
> Sent: Sunday, August 21, 2005 7:08 PM
> To: CF-Community
> Subject: can you replace a valueList() ...
>
> can you do this?
>
> listToArray(valueList(replace(session.menuMatrix.menuItem,',',' ','all')))
Breaking this down you can't do:
replace(session.menuMatrix.menuItem,',',' ','all')
Unless session.menuMatrix.menuItem is a string - if it's (as I think it is?)
a column in a query this won't work.
However what do want at the end? If it's just an array you can already
access an Query Column as an array.
You can do:
<cfloop from="1" to="#ArrayLen(session.menuMatrix.menuItem)#" index="Cnt">
<cfoutput>#session.menuMatrix.menuItem[Cnt]#</cfoutput>
</cfloop>
There's very little Array processing that you can't do with query column as
it is.
If that's not what you want to do and you really need the delimited list
first remember that valueList() (and ALL the CF list functions) can accept a
delimiter as an argument. You don't HAVE to use a comma as your delimiter -
and I wouldn't if your content has commas. You can pick an odd control
character or anything that's not going to be in your content.
Jim Davis
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
This list and all House of Fusion resources hosted by CFHosting.com. The place
for dependable ColdFusion Hosting.
http://www.houseoffusion.com/banners/view.cfm?bannerid=11
Message: http://www.houseoffusion.com/lists.cfm/link=i:5:170581
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54