Can someone explain to me why after incorporating PDO into my code the way I call Smarty has changed? For instance I am receiving lots of errors because Smarty is not functioning post PDO.
Example Pre-PDO that worked:
{assign var='udatas' value="{$userObj->fetchUser(array('id'=>{$ststres[ststval].to_id}))}"}
<span class="box-commnt-laps">{insert_time_dif({$ststres[ststval].added_date})} ago</span>
Example Post-PDO now works:
{assign var='udatas' value="$userObj->fetchUser(array('id'=>$ststres[ststval].to_id))"}
<span class="box-commnt-laps">{insert_time_dif($ststres[ststval].added_date)} ago</span>
I can’t seem to find any references on the net how I used structure smarty Post-PDO. Can you please point me in the right direction or explain why this happens and how to resolve?
The correct answer Update:
Is to add [] between the associative array and remove the quotes like so.