RE: [PHP] Smarty problem
| From: | Javier Tacon | Date: | Wed, 08 Oct 2003 14:04:59 +0000 |
| Subject: | RE: [PHP] Smarty problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-165430@lists.php.net to get a copy of this message | ||
What do you mean with garbage? What's that garbage?
What's the content from $entry_events ?
You should debug your own code, we can't do it with a few lines from your code
-----Mensaje original-----
De: Webmaster [mailto:webmaster@dentona.de]
Enviado el: miércoles, 08 de octubre de 2003 15:57
Para: php-general@lists.php.net
Asunto: [PHP] Smarty problem
Importancia: Baja
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php