PHP - I need a way to replace square brackets with dynamic data
<p>I am trying to build a system which will allow the user to enter a certain amount of text in a textarea field, within the text entered, the user will enter a "variable" in the format [VAR], the text VAR will be replace by the "variable" the user needs such as [AMOUNT], which will query a database to find the amount for the user, i need a PHP script will find those square bracket variable and replace it by some dynamic data. </p>

<p>Can anybody help?</p>

<p>Regards,
Roddy</p>
