my code is not working for some reason. Here is the code. If you see anything wrong, please let me know.
Thanks
$oURL = '<span class="text2"><a href="javascript:##openURL(\'{URL}\')">{DESCRIPTION}</a></span>';
$openURL = str_replace('{URL}', '\\1', $oURL);
$openURL = str_replace('{DESCRIPTION}', '\\2', $openURL);
$patterns = array();
$replacements = array();
$patterns[] = "#\[openURL=\"(.*?)\"](.*?)\[/openURL\]#is";
$replacements[] = $openURL;
$text = preg_replace($patterns, $replacements, $text);
##openURL is really openURL without the '##'
this is an example of whats in the database:
[openURL=../includes/video_tape.mtm]details[/openURL]