There is such a cycle:
$req = DB::run("SELECT `games`.*, " . Games::count() . " FROM `games` ORDER BY `id` DESC LIMIT " . $this->page . ", " . $this->message); while ($row = $req->fetch(PDO::FETCH_ASSOC)) { $arrayrow[] = $row; $arrayrowgenre[] = DB::run("SELECT * FROM `genre` WHERE `id` IN (" . $row['genre'] . ") ORDER BY `id` ASC")->fetchAll(); } It is necessary to transfer values from the $arrayrowgenre to the smarty template
This option does not fit:
{foreach $arrayrow as $row key=k} {foreach $arrayrowgenre as $genre} {$genre.$k.name|esc}<br/> {/foreach} {/foreach} it displays the wrong values.
$arrayrow,$arrayrowgenre. (print_r). It’s probably not the fault of Smarti, but what you choose and how you build arrays. - teran