littlepeg Posted May 22, 2007 Share Posted May 22, 2007 Hi everybody. I am a very very new learner for php & MySQL and have one easy question would like to ask for advice. I want to store some articles in my database by using PHPadmin. But what should I do if I want to output these articles as what they are (have different paragraphs ) rather than all cluster together in one paragraph. Any help would be grately and appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/52484-please-help-me-with-this-output-issue/ Share on other sites More sharing options...
Dragen Posted May 22, 2007 Share Posted May 22, 2007 do you know how you are storing them? the best way would probably be to store them in a row with each paragraph surrounded by '<p></p>', then when you output it they'll automatically be in seperate paragraphs. Quote Link to comment https://forums.phpfreaks.com/topic/52484-please-help-me-with-this-output-issue/#findComment-259012 Share on other sites More sharing options...
littlepeg Posted May 22, 2007 Author Share Posted May 22, 2007 Hi, Thank you for you reply. :)Do you mean that I should store the articles like this: '<p>jjfoisdajfiosjdfiosjdfoijsdif</p>' (for the first paragraph), '<p>ksldjfoisajdfiojdsafiojdsfdsfsdafjioji</p>' for the next paragraph? Quote Link to comment https://forums.phpfreaks.com/topic/52484-please-help-me-with-this-output-issue/#findComment-259029 Share on other sites More sharing options...
Dragen Posted May 22, 2007 Share Posted May 22, 2007 yeah. Quote Link to comment https://forums.phpfreaks.com/topic/52484-please-help-me-with-this-output-issue/#findComment-259051 Share on other sites More sharing options...
per1os Posted May 22, 2007 Share Posted May 22, 2007 If you are entering it in from a text area and do an enter etc, it creates a \n character. Using www.php.net/nl2br may prove helpful for you. Quote Link to comment https://forums.phpfreaks.com/topic/52484-please-help-me-with-this-output-issue/#findComment-259080 Share on other sites More sharing options...
littlepeg Posted May 22, 2007 Author Share Posted May 22, 2007 Thank you Quote Link to comment https://forums.phpfreaks.com/topic/52484-please-help-me-with-this-output-issue/#findComment-259244 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.