Jump to content

Converting textbox HTML to BBCode


Gibbs

Recommended Posts

Hi all new here and to PHP but i'm really getting into this stuff :)

I've just enabled BBcode on a page editor i've been working on bt using the $pattern and $replace functions and it works a treat.

On the editor page i'm using the following code to allow the user to edit the page:
[code]$fn = "/home/user/public_html/dir/page.php";
print htmlspecialchars(implode("",file($fn)));[/code]

I want to reverse the HTML code that appears into BBcode.

I need the page to be in HTML but for it to be as user-friendly as possible i need it to appear as BBcode in the textbox.

Any methods or help is very much appreciated.

Thanks!
Link to comment
https://forums.phpfreaks.com/topic/34202-converting-textbox-html-to-bbcode/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.