![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 52 Pomógł: 0 Dołączył: 8.02.2016 Ostrzeżenie: (0%) ![]() ![]() |
Witajcie
Jest tu ktoś kumaty w bibliotece smarty. Jak zrobić aby w tpl wyświetlały się te wartości. Chodzi mi o to np <h1>{$art_tresc}</h1> Mam tabele system news id, namenews, content Ja próbuje robić tak <?php require_once('connect.php'); include_once("./libs/Smarty.class.php"); $smarty = new Smarty; $query = mysql_query("select * from news") or die(mysql_error()); while($row = mysql_fetch_row($query)) { $art_tytul[]=$row['id']; $id[]=$row['id']; $art_tytul_n[]=$row['namenews']; $art_tresc[]=$row['content']; $smarty->assign("id",$row['id']); $smarty->assign("namenews",$row['namenews']); $smarty->assign("content",$row['content']); $smarty->assign("id",$id); $smarty->assign("namenews",$namenews); $smarty->assign("content",$content); } $smarty->display('artykul.tpl'); ?> Dzięki Ten post edytował login90 25.09.2019, 12:14:38 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 19.08.2025 - 14:43 |