hello! for the newline we have the fuction nl2br() but what about BOLD text.. underline or italic ?! is there a way to convert that rich text in to HTML? bold into <b> bold </b>... ??
Squit 0 Newbie Poster
Recommended Answers
Jump to PostFirstly, I'd use <strong> as opposed to <b>, <em> as opposed to <i>. I'd never use an underline as users may confuse this with a hyperlink.
How are you encoding bold type in your rich text? ARe you using [ B ][ / B ]? BBCode??
How are …
Jump to PostSOrry I'm none the wiser. ARe you producing the rich text (e.g. by a wysiwyg editor) and then trying to store it in mysql DB? OR, are you using some mysql jiggery-pokery {"...mysql save it as a rich text"} to transform the string as it inserts/updates?
I wasn't aware …
Jump to PostYou're the one passing rich text. Where the hell is this rich text coming from??
If you're pasting raw rtf code:
"Help me please" would be
Help me \b please\b0
Parse with
$string = str_replace("\b0","</strong>",$string); $string = str_replace("\b","<strong>",$string);
in that order.
…
Jump to PostThis only works when using PHP on Windows servers...
All 16 Replies

diafol
Squit 0 Newbie Poster

diafol
Squit 0 Newbie Poster
Stefano Mtangoo 455 Senior Poster
Squit 0 Newbie Poster

diafol
Squit 0 Newbie Poster

diafol
solutionfinder 0 Newbie Poster
ThLFR 0 Newbie Poster
solutionfinder 0 Newbie Poster
dean8710 -3 Junior Poster in Training
SautinSoft 0 Newbie Poster
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
SautinSoft 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.