So everything in my current project seems to be going well (after some help from a couple of people here, thanks!). When all of a sudden I notice that something isn't displaying correctly on one of my pages that's built from a template. I thought the data in the database was bad, but I looked at it directly, and sure enough, it's correct.
It's a text field that includes a dollar sign. For each record in the table, I'm assigning the value in the field to a template field:
$templateVariable->setVariable("FIELD",$row["c_value"]);
The value in the database is "Less than $15,000".
What's showing up on my page is "Less than ,000".
I did a simple "print" statement in the loop and the data printed out correctly. But when I view the page source, the "$15" isn't there where the database value has been assigned to the template variable.
I tried enclosing the $row[] in double-quotes and curly braces:
$tv->setVariable("FIELD","{$row["c_value"]}");
Same display. I tried wrapping the htmlspecialchars() function around the $row[]; same display.
What's going on here?
Thanks,
Rich