Smarty templating issue
At work I use Smarty for PHP templating, I would prefer to use Zend MVC but our Sever 2003 boxes don’t have url rewriting. End of rant. But I had an issue that was odd and just wanted to post the solution I found, I hope it helps someone. The issue was I was trying to fill a form in using data from a database so the user could edit the information. I was passing a database value and directly assigning it to a Smarty variable. Well the data would render as 0 (zero) when the page was output. There were no errors, just zeros. Well apparently Smarty did not like the hyphen in the word being returned from the database. So I changed the hyphens to underscores and all was well. Let me know if you run into this odd error.
Categories: Uncategorized

