Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 07-16-2004, 12:15 PM   #1 (permalink)
v7n Mentor
 
Izzmo's Avatar
 
Join Date: 11-01-03
Location: Kansas City
Posts: 1,330
iTrader: 0 / 0%
Latest Blog:
Starting p90x today

Izzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web pro
Send a message via ICQ to Izzmo Send a message via AIM to Izzmo Send a message via MSN to Izzmo Send a message via Yahoo to Izzmo
PHP=> a text box and making breaks when needed.. HELP PLE

Okay, I've encountered this little problem. I have a site, a MySQL Database, and I have a script that makes new tables with a textbox... This script is basically for News.

Now, basically, if you do it without anything and you submit a big long text to a database without any <br>'s or <p>'s and then want to show it through your website, it will just be a big long text. Now, I don't know what the right function is for PHP to automatically place in <br>'s and such to make it a paragraph sentance...

Can someone help?

P.S.- Here is what mine look like without me putting in HTML Tags:
(I didn't write this)

Quote:
"WASHINGTON--The U.S. Senate on Thursday voted unanimously to slap restrictions on a controversial Pentagon data-mining program that critics say would amount to a domestic spying apparatus. By unanimous consent, the Senate inserted a moratorium on the program into a massive spending bill, which was approved by a 69-29 vote late Thursday.The vote represents an unusual triumph of privacy concerns over the Bush administration's arguments that the Pentagon's Total Information Awareness (TIA) program would be useful for national security. If fully implemented, TIA would link databases from sources such as credit card companies, medical insurers and motor vehicle agencies in hopes of snaring terrorists..." [news.com]
I want it to be in paragraph form though WITH PHP ADDING THE <p>'s AND <br>'s FOR ME! like this:
Quote:
"WASHINGTON--The U.S. Senate on Thursday voted unanimously to slap restrictions on a controversial Pentagon data-mining program that critics say would amount to a domestic spying apparatus. By unanimous consent, the Senate inserted a moratorium on the program into a massive spending bill, which was approved by a 69-29 vote late Thursday.

The vote represents an unusual triumph of privacy concerns over the Bush administration's arguments that the Pentagon's Total Information Awareness (TIA) program would be useful for national security. If fully implemented, TIA would link databases from sources such as credit card companies, medical insurers and motor vehicle agencies in hopes of snaring terrorists..." [news.com]
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
Izzmo is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-16-2004, 12:36 PM   #2 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 4,273
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
http://us4.php.net/nl2br - ?
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-16-2004, 12:44 PM   #3 (permalink)
v7n Mentor
 
Izzmo's Avatar
 
Join Date: 11-01-03
Location: Kansas City
Posts: 1,330
iTrader: 0 / 0%
Latest Blog:
Starting p90x today

Izzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web pro
Send a message via ICQ to Izzmo Send a message via AIM to Izzmo Send a message via MSN to Izzmo Send a message via Yahoo to Izzmo
Yes.. seen that.. I don't think that's it.. if it is, than that works really weird. Let me try and do it again.. I don't think that's it though.
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
Izzmo is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-16-2004, 12:49 PM   #4 (permalink)
v7n Mentor
 
Izzmo's Avatar
 
Join Date: 11-01-03
Location: Kansas City
Posts: 1,330
iTrader: 0 / 0%
Latest Blog:
Starting p90x today

Izzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web proIzzmo is a highly respected web pro
Send a message via ICQ to Izzmo Send a message via AIM to Izzmo Send a message via MSN to Izzmo Send a message via Yahoo to Izzmo
Okay, thanks works now
__________________
Izzmo
Coding Guru Extraordinaire
ZeroWeb Hosting & Design - Customizable hosting for every type of user!
Izzmo is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-16-2004, 12:52 PM   #5 (permalink)
No Longer Here
 
Join Date: 09-27-03
Location: State College, PA
Posts: 4,273
iTrader: 0 / 0%
Latest Blog:
None

Jazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebodyJazzee is liked by somebody
NP
Jazzee is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-16-2004, 12:54 PM   #6 (permalink)
Contributing Member
 
Join Date: 07-09-04
Posts: 151
iTrader: 0 / 0%
Latest Blog:
None

Pinyo is liked by somebodyPinyo is liked by somebodyPinyo is liked by somebodyPinyo is liked by somebodyPinyo is liked by somebody
str_replace ("\n", "<br>", $yourstring);
__________________
Greatnexus - add your site today and stay on top of your niche.
Pinyo is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Floating divs breaks in FF, not other browsers iamPariah Coding Forum 0 07-30-2007 05:23 PM
Email Form Format: need line breaks Mrs. Grunion Coding Forum 3 06-12-2007 11:42 PM
JS: making invisible text (display:none) non-selectable gnznroses Coding Forum 7 04-26-2007 05:57 PM
PHP oddly breaks Arenlor Coding Forum 8 01-26-2007 11:37 AM
making graphics with php - problem with text gnznroses Coding Forum 3 04-15-2006 05:26 PM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 04:04 AM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.