Alexmatete Posted June 25, 2012 Share Posted June 25, 2012 Hi. Keep in mind I am a beginner - using Dreamweaver server behaviors I am using a form with Text Edit features to insert user articles. The problem is the text is displayed without lined breaks or any form of formatting. See below my php: PHP Code: <?php echo $row_NewsDisp['news_article'];?> If you can just insert the required tags where they are needed - ie. <b><p><br> Thanks Quote Link to comment https://forums.phpfreaks.com/topic/264729-php-formated-text-diplay-how-do-i-echo-linebreaks-paragraphs-bolding-etc/ Share on other sites More sharing options...
Barand Posted June 25, 2012 Share Posted June 25, 2012 nl2br <?php echo nl2br($row_NewsDisp['news_article']);?> Quote Link to comment https://forums.phpfreaks.com/topic/264729-php-formated-text-diplay-how-do-i-echo-linebreaks-paragraphs-bolding-etc/#findComment-1356780 Share on other sites More sharing options...
SurrealScripts Posted June 25, 2012 Share Posted June 25, 2012 Please note Barand's solution will only add line breaks. Quote Link to comment https://forums.phpfreaks.com/topic/264729-php-formated-text-diplay-how-do-i-echo-linebreaks-paragraphs-bolding-etc/#findComment-1356787 Share on other sites More sharing options...
Barand Posted June 25, 2012 Share Posted June 25, 2012 Without seeing data to see if there is anything in there to indicate where bolding needs to be applied I can't supply any magic recipes Quote Link to comment https://forums.phpfreaks.com/topic/264729-php-formated-text-diplay-how-do-i-echo-linebreaks-paragraphs-bolding-etc/#findComment-1356788 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.