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

working with strings

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
US
I have a string that I bring in from my database. This string is going to be apart of an email body that I will be sending out. I have included a stylesheet along with this email and want to use it. In my database which holds the text I have , separating where I want new paragraphs to begin. My problem is with my code that replaces , with <p>

Here is my code

narstr = Replace(narstr, &quot;;&quot;, &quot;<p></p>&quot;)

my problem is that I want it to look like this

narstr = Replace(narstr, &quot;;&quot;, &quot;<p class=&quot;maintext&quot;></p>

because the word maintext is surrounded by &quot;&quot; it doesn't work and have syntax errors. If I try to work around it with & signs I seem to get no where. Any suggestions?
 
I just relized that I made a type. I am trying to replace ; with <p></p> The replacing works, just not when I try to include styles
 
Try this:
Code:
narstr = Replace(narstr, &quot;;&quot;, &quot;<p class=&quot;&quot;maintext&quot;&quot;></p>&quot;)
 
Although, you may be wanting to do this:
Code:
narstr = Replace(narstr, &quot;;&quot;, &quot;</p><p class=&quot;&quot;maintext&quot;&quot;>&quot;)

To end the preceding paragraph, and start the next.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top