I have a block of content that includes bracketed text such as [author], [revisedon], etc.
I would like to write a PHP script that matches the [...] patterns, extracts the text between the brackets as a lookup key in an assocciative array, and replaces the matched pattern with the value retrieved from the lookup array.
Can someone give me some ideas on how to get started with this?
Thank you,
Malcolm
PS: I know that there are many PHP template language scripts. I'm not writing a template script - my raw content contains the markup I describe above.