Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bold first three words of a string

Status
Not open for further replies.

sevex

Programmer
Joined
Sep 18, 2001
Messages
74
Location
CA
I'm trying to display the first three words of a string in bold, and the rest regular, but I can't figure out how to find the position of the third space to place a closing bold tag, unless there's some easier solution than what I'm trying. (Coldfusion Newbie)
 


<cfset list=&quot;one two three four five six seven...&quot;>
<cfset replace=GetToken(list, 3, &quot; &quot;)>
<cfoutput><strong>#Replace(list, replace, replace&&quot;</strong>&quot;)#</cfoutput>

enjoy :) Sylvano
dsylvano@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top