Outputting text - PHP/Mysql

Associate
Joined
13 Nov 2003
Posts
1,567
Location
Manchester
Hi All

I have nearly finished a new db driven site and the only snagging point I am having at the moment is formatting text that is ouput from the DB

at the moment I have this bit of code to output the text and retain the line breaks
Code:
<?php 
$text = nl2br($row_recBlueskyArticle['article_content']); echo $text; ?>
However I need to be able to use <b> or <strong> tags when entering the data into the database.

What is the best way to do this, I was thinking perhaps text replacement, that replace line breaks with <br/> and <b> with a css class

Any ideas
Thanks
Aaron
 
Back
Top Bottom