I have an array in which I store various recordset values like:
$database_vars['total']
$database_vars['match']
$database_vars['return']
Now when I echo() these values straight out, they display fine.
What I'm doing/running into is this:
foreach($database_vars as $key => $value) { $page = ereg_replace ('\$' . $key . '\$', $value, $page); }
The code is fine (I use this same structure in numerous other places and it works fine). As you can see from the snippet above, the script looks in $page for the key name, wrapped in '$'; the result would be:
"$total$" => "2"
But I don't see "2"...I get these funky looking extended ASCII character set border parts...it's not a &###; sorta HTML character-call but the actual character itself.
I've also tried to use '%' and '#' (both escaped and not) as wrappers, but the results are the same.
Any ideas? I'm thinking it has to do with my template but I'm at odds with that as I return numeric field values to the templates and those work fine.
TIA
Sean Shrum