bbcode/vbcode: How to implement?



Rather than try to reinvent the wheel, I suggest checking out or and searching for "bbcode" or "vbcode", as there are several packages that others have created for this purpose.
Erk. I really need to slow down when I read these posts.. Trying again.

I think you're looking for a tool like HTMLArea, which will turn an ordinary textarea into a WYSIWYG-editable area, a la Word.

There's also RTE, which appears slightly less full-featured.

Other similar products exist, but these are the two I could find with a brief Googling that were both cross-browser and free.
allright lets not reinvent the wheel but use some easy prog to make it happen

Lets consider the following tag for the bold
For bold opening [b]
For bold closing [/b]

For italics opening [b]
For italics closing [/b]

//Now consider you have a string say
$string = "[b]Ruturajv[/b] is my [i]name[/i]";

//Let us replace the string with this
$string = str_replace("[b]", "<b>", $string); 
$string = str_replace("[/b]", "</b>", $string); 
$string = str_replace("[i]", "<i>", $string); 
$string = str_replace("[/i]", "</i>", $string); 

This is a very simple method

you can then use arrays and specify everything
I think swirlee's link is, that tom_masters is asking for
it is same as yahoo have mail composing options...