RE: [Phplib-users] 2 Problems (Reset Button + Template Problem)
Brought to you by:
nhruby,
richardarcher
From: Benjamin H. <ho...@eu...> - 2002-10-09 13:00:23
|
> printallNEWS($t); >=20 > function printallNEWS($t) > { $t->set_file(array( "news" =3D> "news.ihtml",=20 "text" =3D> "text.ihtml", "links" =3D> "links.ihtml")); $news=3D new news(); $db=3D$news->getallNEWS ("news_extern",0,0,0,0); // get news from = the dbase while($db->next_record()) { $t->set_var("author",$db->f("author")); $t->set_var("newstext",$db->f("newstext")); $t->set_var("title",$db->f("headline"));=20 $t->set_var("changed",date("d. M. Y, H:i:s",$db->f("changed"))); =09 $t->parse("contenttext","news",true);=09 } > } >=20 k here=B4s my example ;) $t comes from a other file where i include this file named "news.inc" = so i append the news to the content template . but when i but the stuff into a function nothing appears but i dont = know why. If i copy and paste this code without a function everything = is working fine :( Thanks=20 Benjamin=20 |