sql_query("select * from text where id='home'"); $text = $db->fetch_item('value'); $smarty->assign('text',$text); $db->sql_query("SELECT * FROM news ORDER BY DATE desc limit 2"); $news = $db->fetched_array(); $smarty->assign("news",$news); $smarty->display('index.html'); ?>