$sql = mysql_query("SELECT * FROM `news` WHERE id='$id'");
//Putting the results into an array
while($row = mysql_fetch_array($sql)){
//Putting the result into a smarty array
$result[] = $row;}
//Assing some smarty variables
$smarty->assign("result",$result);
//Display the template file
$smarty->display("index.tpl");