Smarty problem
| From: | Webmaster | Date: | Wed, 08 Oct 2003 13:56:50 +0000 |
| Subject: | Smarty problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-165426@lists.php.net to get a copy of this message | ||
Hi,
I already posted this question in the Smarty group, without success.
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_datum
ASC", "", "", "");
$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