I am trying to create my own tags for a message board.
Example: The tag [link=http://www.me.com]My link[/link] will later create the output <a href="http://www.me.com">My link</a>
I stored the generic tag format in a database. The generic format is: [link=1]2[/link], and <a href="1">2</a>
So, when I will check a message, I have to use regex to get an array which will look like this:
array:
1 => http://www.me.com
2 => My link
Later, it will be easy to parse this array in my <a href="1">2</a> format.
Any idea on how to create the array I need?