I need to fill an array from all text, within a string that begins with [ and ends with ].
For Example:
here is some text [to do] and something else [/find] for the way this works is [object] and [tada]
This should return an array like so:
array('[to do]', '[/find]', '[object]', '[tada]');
How can I do this quickly? And in the same order that's in within the text?
There can be any characters at all within the square brackets. I just need to grab them all, plus both brackets.