Jump to content
xisto Community
Sign in to follow this  
galexcd

A Script To Close All Bbcode Tags In Php can you help me write one?

Recommended Posts

ok, ive got a chat that I made from scratch in flash. Its actually pretty damn cool! I just coded it so bbcode is allowed, but ive got a sligt problem. if sobody dosnt close a tag, then the tag stays active for the following messges. <_< , so i thout, why not add the end of every tag, at the end of every message
example:

[/b][/u][/i][/url][/color]

but then i relized, flash's html encoding is very propor, and all tags must be closed in the order that they were opened!
[b][u]text[/u][/b] << works[b][u]text[/b][/u] << dosn't work

AND if sombody opens the same tag twice, the tag must be closed twice!
[b][b]text[/b][/b] << works[b][b]text[/b] << dosn't work

I need a php script that can take a string, and add close tags to every line, in the same order they were opend. I was thinking of how to approach this, but i just can't come up with a script. Any ideas?

Thanks!

edit: put code in code tags
Edited by qwertyiscool (see edit history)

Share this post


Link to post
Share on other sites

This post was offering hosting credits for helping me write the code, but i have recently found out that you must be hosted to transfer hosting credits. But i still really need this code or anything that can help me!Any input would help as well!!!Thanks!!

Edited by qwertyiscool (see edit history)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.