473,395 Members | 1,666 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Paragraph tags in script (textwrap)

Hi I'm working on a classified website. The problem i'm facing is that in the Place an AD I have a section where you put the description of the product.

The problem is even if the user puts paras the writeup does not take it. As an admin I have to put the <br> tags in the write-ups. How do I change the script so that it automatically take the paras.
Oct 16 '07 #1
1 1143
ronverdonk
4,258 Expert 4TB
Welcome to TSDN!

I assume that you use a textarea for the description text. You have to translate the carriage returns into breaks. Use PHP command 'newline-to-breaks' nl2br(), as follows:
Expand|Select|Wrap|Line Numbers
  1. $text = nl2br($text);
  2.  
Ronald
Oct 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Stefan Weiss | last post by:
Hi. (this is somewhat similar to yesterday's thread about empty links) I noticed that Tidy issues warnings whenever it encounters empty tags, and strips those tags if cleanup was requested....
6
by: Steven Bethard | last post by:
So I've recently been making pretty frequent use of textwrap.dedent() to allow me to use triple-quoted strings at indented levels of code without getting the extra spaces prefixed to each line. I...
2
by: Kevin Blount | last post by:
I have a string of HTML (used for a specific purpose) that I'd like to use somewhere else but as plain text. Rather than introduce a specifically created plain text version I'd like to strip the...
4
by: ad | last post by:
I want to put a HTML paragraph on a WebForm in program. There are HTML tags in the paragraph, I hope the paragraph can render as normal HTML page. Which control can I use to place the HTML...
0
by: Byomokesh | last post by:
Hi, I have problem facing in Linking Tags. Linking are 3 types. <!-- Just remark Id --> :( 1. Pref02fn1 <!-- This footnote text move to paragraph in place of link tags. --> 2....
19
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something ok" End Function </script>
1
by: mflll | last post by:
I am having trouble responding writing a Javascript Program respond to keypresses on top of a paragraph. Here is the code I tried: <HTML> <SCRIPT Language="JavaScript">...
3
by: gomsi | last post by:
hi, i have a paragraph where i have to insert <markand </marktags to highlight the required words.i am implementing it in c++ i am currently doing it as follows.. i take the corresponding...
3
by: TP | last post by:
Hi everybody, Recently, I have tried to improve the look of the printed text in command line. For this, I was compelled to remove redundant spaces in strings, because in my scripts, often the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.