Jump to content

help with parsing colors


golfromeo

Recommended Posts

In my system, when a person sends a private message, I want them to be able to display colors, like so:

 

(WITHOUT exclamation point)

[!color=red]Hello![/color]

 

Is there a way using Regex to recognize the color tag, and then separate that into "red" and "Hello!"?

 

Because once I can do that, I have the code to change the red color and make it into a hex code for CSS.

 

Thanks for any help in advance.

Link to comment
https://forums.phpfreaks.com/topic/182443-help-with-parsing-colors/
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.