Login   Register  
PHP Classes
elePHPant
Icontem

I want use this class for smarty template.

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Ultimate MySQL  >  All threads  >  I want use this class for smarty template.  >  (Un) Subscribe thread alerts  
Subject:I want use this class for smarty template.
Summary:I want use this class for smarty template.
Messages:1
Author:Bill Alex
Date:2013-05-02 05:46:49
 

  1. I want use this class for smarty template.   Reply  
Picture of Bill Alex
Bill Alex
2013-05-02 05:46:50
In php file:
$SQL = "SELECT * FROM ".$db_prefix."news";
$smarty->assign('News', $db->Query($SQL));

In tpl file:
{foreach item=INews from=$News}
Title: {$INews.NewsTitle}
{foreachelse}
No news
{/foreach}

but it don't working. Please help me.