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

New line after every 5 words

Status
Not open for further replies.

jasonhuibers

Programmer
Sep 12, 2005
290
CA
I am currently using replace function to add a new line after each "." but will be more presentable if there is a new line after every 5 words? How can I add a new line after every 5 words?

 
Since words can vary in length I would think a good approach would be div tag of a certain width rather than ASP that adds a line break. Or is there more to this?

Dave [idea]
[]
 
The record pulled from the recordset is all on one line... I am trying to make the text more presentable...
 
but will be more presentable if there is a new line after every 5 words?

That all depends on what it is you are presenting.

An 'article' would be horrible to read, a list of words or data not so bad.

How can I add a new line after every 5 words?

In plain text or as HTML?

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.
Webmaster Forum
 
You mean to *twitch* break your text to make it more presentable? [poke]
Why don't you put it in a div of a certain class and simply define the width of that div via css? Maybe with justified layout even?


"Knowledge is power. Information is liberating. Education is the premise of progress, in every society, in every family." (Kofi Annan)
Oppose SOPA, PIPA, ACTA; measures to curb freedom of information under whatever name whatsoever.
 
I'm not sure it will looks good, but back to original question
you can split your text by " " (space) and when reassemble line back insert new line after every 5 array alements
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top