I have a tag like this
[tag id="4554" align="center"]
How can i get the tag as a key in an array and then all the arguments are dynamic and inserted in the array as key => value like
Array (
[tag] => Array
(
[id] => 4554
[align] => "center"
)
)
I generally favor algorithms to regular expressions:
outputs: