mysql and php text formatting problem
Moderator: General Moderators
-
mayanktalwar1988
- Forum Contributor
- Posts: 133
- Joined: Wed Jul 08, 2009 2:44 am
mysql and php text formatting problem
hey i have just created databse and i will extract information through it with php..but the problem is that.when i submit data in paragraph form..php truncate the spaces in between two paragraphs..and dispaly it as one paragraph as a whole..i just want that the format in which the data was submitted and the format in which the data will be extracted out should be the same while dispalying what can be done for this...
Re: mysql and php text formatting problem
PHP didn't do anything. You're getting exactly what you put in.mayanktalwar1988 wrote:hey i have just created databse and i will extract information through it with php..but the problem is that.when i submit data in paragraph form..php truncate the spaces in between two paragraphs..and dispaly it as one paragraph as a whole..i just want that the format in which the data was submitted and the format in which the data will be extracted out should be the same while dispalying what can be done for this...
Take your complaint to the W3C. They're the ones who said that multiple whitespace, which includes spaces and newlines, are normally collapsed to one single space.
You can use nl2br to convert the newlines to HTML line <br>eaks.