>- see footer for list info -<
Heres a nasty string manipulation solution which i would never use on an
actual website:


<cfset str="This package consists of 1 of product A 2 of product B 13 of
product B">

<cfset found = 1>
<cfset counter = 0>

<cfset str = replacenocase(str,"consists of","consists of<br><br>",1)>

<cfloop condition="found gt 0 and counter lt len(str)">
        <cfset found = reFind(" [0-9]",str,1,0)>
        <cfif found neq 0>
                <cfset str = left(str,found)&"<br>"&right(str,len(str)-found)>
        </cfif>
        <cfset counter = counter + 1>
</cfloop>

<cfoutput>#str#</cfoutput>

:)
Kerry


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Paul Swingewood
Sent: 18 November 2004 11:29
To: [EMAIL PROTECTED]
Subject: [CF-Dev] listgetat?


>- see footer for list info -<
CAn anyone help me with this one please.

I have a field in SQL that contains "This package consists of 1 off product
A 2 off product b etc..."
The user types in what is included into a text box on a form.

I want to be able to display the contents of this field in a list like this

This package consists of

1 off product A
2 off product B

etc ....

How can I code this in coldfusion?

Regards - Paul


_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to