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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with format text in CF 1

Status
Not open for further replies.

kuolung

Programmer
Sep 2, 1999
51
US
the result my query is simple by just printing the name like this:

name
-------------
smith,john
jones,sue

however, what function in CF can i use to put the extra space after the comma (,) in all the names. Thanks.........
 
!!! you don't use any function to do so in cf !!!!!!!
<cfoutput query=..>
#query.name#, #query.surname#<br>
</cfoutput>
adds the white space !!!! if you're not sure the browser will recognize it, use &nbsp; (the HTML code for an unbreakable space) : #query.name#,&nbsp;#query.surname#<br>
?? why would you want a cf function ??? maybe i misunderstood your question ?
 
hello iza, thanks for replying. however, it was the bad design in database, both lastname and firstname are stored in the same field (NAME) and seperated by a comma with no space. So i need to print out with lastname, (space) firstname.....
any idea how??? thanks....
 
this will work
#replace(queryname.variablename, &quot;,&quot;, &quot;, &quot;)#
You are replacing comma by comma and a space.
 
siorry i wasn't much here last week
ram123's solution is THE solution you need ! let us know if it fixed your problem (should have !)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top