Hello:
I found this code in PHPlib template class, however I can't figure it out, please help.
$str = preg_replace(array('/$([0-9])/', '/\([0-9])/'), array('$\1', '\\1'), $str);
Thanks,
Alan
Usually a good place learn about a php function (like preg_replace) is to read the relavant documentation. In this case, you can find the following (copied from the docs for preg-replace):
"If pattern and replacement are arrays, then preg_replace() takes a value from each array and uses them to do search and replace on subject."