Re: Smarty problem
| From: | pete M | Date: | Wed, 08 Oct 2003 14:37:59 +0000 |
| Subject: | Re: Smarty problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-10317@lists.php.net to get a copy of this message | ||
have u done a print_r($entry_events) to see what u are getting back from the db.. ?
pete
Webmaster wrote:
Hi, I have a problem with Smarty. I wrote the following function that gets data from a mysql database: function showHeadlines() {global $db; $entry_events = array();if ($this->showold == "true") { $db->select("*", "news", "(d_kategorie = 'de_termin')", "d_datumASC", "", "", "");$entry_events = $db->fetch_array();$this->assignVars('termineAus', $this->aTrans['termineAus']);$this->assignVars('entry_events', $entry_events); } The template part looks like this: <table width="100%" border="0" cellspacing="0" cellpadding="5" align="center"><tr><td><h2>{$events}</h2></td> </tr> <tr> <td><a href="{$filenpath}?showold={$showold}"><i>{$termineAus}</i></a></td> </tr> {section name=i loop=$entry_events} <tr><td bgcolor="#e2e2e2"><b>{$entry_events[i].d_datum}{$entry_events[i].d_zeit}</b></td> </tr> <tr><td><b>{$entry_events[i].d_ueberschrift}</b></td></tr> <tr><td><b>{$place}:</b> {$entry_events[i].d_ort}</td></tr> {/section} </table> The problem is that the output in only garbage? Is there a logical problem ? Thank you very much.