Function to handle string substitution in php

This php function replaces any occurances of tags in a string with the corresponding hash value in the $_REQUEST hash.

For example, if the string contains , it would be replaced with $_REQUEST["NAME"].  This is good for creating SQL calls, or building output strings.

function substitute ($s) {

}

}

 


Note - You should change the regular expression to match what you are looking for; you can pass in an arbitrary array with values to substitute.