php - Help with regexp
325
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"
)
)
Answer
Solution:
Try it here: http://ideone.com/72AxJ
Answer
Solution:
I generally favor algorithms to regular expressions:
outputs: