I defined a function that replaces template vars, and it looks like this
function replace_var($var, $replacement, $v)
{
return ereg_replace("{$var}", htmlspecialchars($replacement), $v);
}
on my WinNT box (PHP4.0.4.pl1), everything is OK, when I call it like
$form = replace_var("MODEL", $model, $form);
But, on a web host PHP4.0.1/Linux I get following error/warning:
Warning: Invalid content of {} in /home/site12/scipt.php on line 585
What is the problem?
thanx in advance
coyote