Haha, it's one of those stupid little errors; you have all the Regex stuff correct. Change:
Code:
to
Code:
Code:
preg_replace($rep, $rep1, $temp);
Code:
$temp = preg_replace($rep, $rep1, $temp);