I tried wrappers of #, $, and % and got the same non-numeric output:
...
// ereg_replace
$template = ereg_replace ("#total#", $total_rows, $template);
$template = ereg_replace ("%total%", $total_rows, $template);
$template = ereg_replace ("$total$", $total_rows, $template);
// output the result
echo($template);
Interestingly enough, when using '$', the only way that the token was replaced (still incorrectly) was like this:
$template = ereg_replace ('\$total\$', $total_rows, $template);
Any other ideas?
Sean Shrum