<cfset list1 = "www.chesseracing.org,www.micro.com,www.cheesemonkey.com"> <cfset list2 = "site1,site2,site3">
<cfset lCount = 1> <cfloop list="#list1#" index="ii"> <cfoutput><a href="#ii#">#listGetAt(list2, lCount)#</a></cfoutput> <cfset lCount = lCount + 1> </cfloop> this is ofcourse asuming that your lists are the same length. (note the use of a count and listGetAt) On a side note, you should really store this information over multiple rows in the database. HTH Tom ----- Original Message ----- From: "James Buckingham" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 04, 2004 12:38 PM Subject: RE: [ cf-dev ] Breaking up a list > Hi guys, > > Just to twist this slightly. > > I've actually got two fields for these links. One contains the title to be > used, the other contains the appropriate link. > > How can I setup this loop so it breaks up two strings, inserts one part into > the HREF and the other as the link title? > > Cheers again, > James > > _____ > > From: John Beynon [mailto:[EMAIL PROTECTED] > Sent: 04 June 2004 11:46 > To: [EMAIL PROTECTED] > Subject: RE: [ cf-dev ] Breaking up a list > > Use cfloop and loop over the list? > <cfloop list="#mylist#" index="i"> > <cfoutput>#i#<br></cfoutput> > </cfloop> > jb > -----Original Message----- > From: James Buckingham [mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > ] > Sent: 04 June 2004 11:25 > To: '[EMAIL PROTECTED]' > Subject: [ cf-dev ] Breaking up a list > Hi guys, > Sorry, I've asked this before but I can't seem to find the emails in my > archive. > I have a string of weblinks within an Access database which are separated by > > a comma. > Here's an example: > www.macromedia.com,www.google.com,www.ebay.com > etc. etc. > What I need to do is break this string up and display the links as a > vertical list on a page. > So the example above would become: > www.macromedia.com > www.google.com > www.ebay.com > Is there a way I can do this? > I'm currently run CF5.0 > Cheers again, > JamesB > -- > These lists are syncronised with the CFDeveloper forum at > http://forum.cfdeveloper.co.uk/ <http://forum.cfdeveloper.co.uk/> > Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > <http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/> > > CFDeveloper Sponsors and contributors:- > *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided > by activepdf.com* > *Forums provided by fusetalk.com* :: *ProWorkFlow provided by > proworkflow.com* > *Tutorials provided by helmguru.com* :: *Lists hosted by > gradwell.com* > To unsubscribe, e-mail: [EMAIL PROTECTED] > > _____________________________________________________________________ > This e-mail has been scanned for viruses by MCI's Internet Managed Scanning > Services - powered by MessageLabs. For further information visit > http://www.mci.com <http://www.mci.com> > > > ********************************************************************** > Copyright ERA Technology Ltd. 2004. (www.era.co.uk). All rights reserved. > The information supplied in this Commercial Communication should be treated > in confidence. > No liability whatsoever is accepted for any loss or damage > suffered as a result of accessing this message or any attachments. > ********************************************************************** > > _____________________________________________________________________ > This e-mail has been scanned for viruses by MCI's Internet Managed Scanning > Services - powered by MessageLabs. For further information visit > http://www.mci.com > -- These lists are syncronised with the CFDeveloper forum at http://forum.cfdeveloper.co.uk/ Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ CFDeveloper Sponsors and contributors:- *Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by activepdf.com* *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com* *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com* To unsubscribe, e-mail: [EMAIL PROTECTED]
