| Autor | Zpráva | ||
|---|---|---|---|
| unlucky Profil |
#1 · Zasláno: 26. 10. 2012, 20:41:10
mam ve smary
{foreach key=kid item=itm from=$content}
//obsah
{/foreach}Nyni do obsahu chci vlozit data: public function avgRating($id){
$this->uniqueName = $id;
$this->database();
$this->data();
$averageRating = round($this->decAVG * $this->elements, 1);
return $averageRating;
} |
||
| whoami Profil |
#2 · Zasláno: 26. 10. 2012, 23:43:02
Přesně nechápu jaké id.. Ale když dáš..:
$smarty->assign('class', new class_with_function_avgRating());{foreach $content as $item}
{$item.name|escape} ({$class->avgRating($item.id)|escape})
{/foreach} |
||
| unlucky Profil |
#3 · Zasláno: 27. 10. 2012, 00:12:09
dekuju, funguje perfektne
|
||
|
Časová prodleva: 14 let
|
|||
0