I want my users to be able to use different date formatting without using the date_format option Smarty comes with, for different reasons.
So i tried following:
Template
{foreach from=$list_entries item=row_entries}
<h1>{$row_entries.title}</h1>
<p>{$row_entries.content}</p>
{/foreach}
PHP
$blog_template = mysqli_fetch_assoc(mysqli_query($con,"SELECT * FROM installed_designs WHERE u_id='$current_user_id' AND standard='1'"));
$smarty = new Smarty();
$result_entries = $con->query("SELECT * FROM entries");
$list_entries=array();
while ($row_entries = $result_entries->fetch_assoc())
{
$list_entries[]=$row_entries;
}
$smarty->assign('TemplateCSS', $blog_template["css"]);
$template_string = $blog_template["template"];
$smarty->assign('list_entries', $list_entries);
// Debugging and caching
$smarty->debugging = false;
$smarty->caching = false;
$smarty->cache_lifetime = 0;
$smarty->display('string:'.$template_string);
But the date remains same in every entries. Is there a way to work this out?