I am currently making a BBCode class for my website. I need to do the following.
function bbCode([skill]Q[/skill]_________[skill]Q[/skill]_________[skill]Q[/skill]);
bbCode function has to replace all Q's between [skill] and [/skill] tags, and replace it with $skillArray['Q'] value. ($skillArray is character dependant.)
How can I do this?
A little clearer version is:
- For example you're on a page of "Orc" character.
- [skill]Q[/skill] tag should get "Orc's Q skill name" automatically.
- For example you're on a page of "Hunter" character.
- [skill]Q[/skill] tag should get "Hunter's Q skill name" automatically.
Ps. Don't want to use explode.