hey, I'm having big problems with a scrap of code I made. I traced the bug down, and for some reason..it's here; and I can't figure it out. I think it's the $ in the preg_replace function. Here's my code:
//set patterns
$pattern = array(
'/\$PARENT_PATH\$/',
'/\$PATH\$/'
);
//set replacements
$replacement = array(
$parent_path,
$path
);
foreach($a['html'] as $key=>$value){
echo $key . "BLAH";
//make replacements
$value = preg_replace($pattern, $replacement, $value);
//add new lines on the end of every html section
$value = $value . $n;
//set value in user html array
$a['html'][$key] = $value;
}
any help would be greatly appreciated. :]