I am newbie to smarty and trying to output some results in my tpl file fetching from php. In my account.php
file I have put Below code
<?php
include SMARTYLOADER;
$ad2 = $db->fetchRow("SELECT * FROM ip_ptc");
$smarty->assign("ad2", $ad2);
$smarty->display("account.tpl");
$db->close();
exit();
?>
and in my account.tpl
file i have written below code to fetch the result
{$ad2.country}
but it is showing an undefined index variable ad2
what's wrong i am doing