I'm having trouble with regular expression readability; is there a
better way to write preg_replace which would replace all occurrences of
:someWord with 'addslashes($ar r["someWord"])'?
function DBReplacePlaceh olders ($sql, &$arr) {
return preg_replace(
"/:(\w+)/e",
'"\'". addslashes($arr["\1"]) ."\'"',
$sql
);
}