Page 1 of 1

Text formatting in user input

Posted: Sat Oct 24, 2009 1:20 pm
by Glowing Face Man
Hi everyone,

I want to take user input from a database and print it on the appropriate pages... I'd like to parse it so as to allow my users to mark it up, just like you can do in this forum, e.g. with [ url="whatever.com" ]link[ /url ] (minus the spaces).

Of course that'll be a lot of work to code from scratch... is there a standard function already written somewhere to do exactly this?

Thanks :D

Re: Text formatting in user input

Posted: Sun Oct 25, 2009 8:07 am
by markusn00b
Glowing Face Man wrote:Hi everyone,

I want to take user input from a database and print it on the appropriate pages... I'd like to parse it so as to allow my users to mark it up, just like you can do in this forum, e.g. with [ url="whatever.com" ]link[ /url ] (minus the spaces).

Of course that'll be a lot of work to code from scratch... is there a standard function already written somewhere to do exactly this?

Thanks :D
There aren't any functions/classes in the PHP core, but there are a few community written libraries such as HTML_BBCodeParser library from PEAR.

Mark.