Entry
Formatting User's Input
Feb 23rd, 2007 23:12
PHP Man, Wise One,
i hav a form which has textarea. My user input their texts like this
bla bla bla bla bla bla.....
[BIBLE]"But when you give to the needy, do not let your left hand know
what your right hand is doing." (Matthew 6:3)[/BIBLE]
bla bla bla bla bla bla....
Now wat i wan is
1. Find [BIBLE] & [/BIBLE] tag from the users input
2. remove the [BIBLE] & [/BIBLE] tag
3. just format whatever is in between those tags. Make bold & red
color => text inside double quotes. Make italic & blue => text inside
curly brackets.
My final html code shld b like this
bla bla bla bla bla bla.....
"<font color=#FF0000><b>But when you give to the needy, do not let
your left hand know what your right hand is doing.</b></font>" (<font
color=#0000FF><i>Matthew 6:3</i></font>)
bla bla bla bla bla bla....
i need a function which automatically check for the presence of
[BIBLE]...[/BIBLE], if found do rest of the formatting... is it
possible?????
ne 1 can help me pls???
thnx
=======
planetpdf.com/developer/article.asp?
ContentID=slicing_and_dicing_formattin&gid=6306
hope that helps.
http://americanahost.com
http://www.qwesz.com