Oto mój kod:
<?php class Template { public $template; function load($file) { $this->template = $file; } function assign_vars($array) { $templates = $this->template; foreach($array as $key => $val) { } $this->template = $temp; } function generate() { } } $template = new Template; $template->load("template.html"); "ID" => $row["id"], "PASS" => $row["pass"] )); } $template->generate(); ?>
Niby działa ale nie wyświetla tak jak trzeba. Mam w bazie tabele test a w niej pola id i pass, dodałem do niej dwa rekordy i chciałbym aby były one poprawnie wyświetlone.
Błagam, proszę o pomoc.