| | | | |
| | |
| Erfahrener Benutzer | Hallo, ich habe hier auf mein Script Smarty gelegt, was auch bisher gut funktioniert hat. In der Smarty-Doku steht für meine Verwendung drin, ich solle folgendes machen: PHP-Code: Das ist mein PHP-Code: PHP-Code: Code: {foreach key=id item=content from=$content}
<table cellspacing="4" cellpadding="4" class="content">
<tr>
<td class="title" align="left" valign="middle">
{$content.timestamp|date_format:"%Y-%m-%d %H:%M"}
{$content.title} von {$content.author}
</td>
</tr>
<tr>
<td class="post" align="left" valign="top">
{if $content.imgsrc neq ""}
[img]templates/darkExcite/img/avatars/{$content.imgsrc}[/img]
{/if}
{$content.content}
</td>
</tr>
</table>
{/foreach}
Jedenfalls weiß ich, dass ich diese Funktion irgendwie falsch nutze. Danke im voraus. MfG, WasserDragoon. EDIT: Sobald ich print_r ($mysql->fetch()); mache kommt das richtige Array: Code: Array ( [timestamp] => 1153966386 [title] => Test-News [author] => WasserDragoon [imgsrc] => [content] => Dies ist ein Test-Beitrag. :-D ) |
| |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| foreach equivalent aber mit Datenmanipulation | Matt | PHP Tipps 2008 | 2 | 26.02.2008 16:47 |
| Lambda-Funktion und array_map/_filter gegen foreach | KingCrunch | PHP Tipps 2007 | 5 | 29.04.2007 10:28 |
| foreach verändert die werte des arrays das durchlaufen wird | Crypi | PHP Tipps 2007 | 5 | 10.01.2007 08:24 |
| foreach mit zwei übergebenen Arrays ? [erledigt] | horstenpeter | PHP Tipps 2006 | 1 | 03.09.2006 16:47 |
| foreach() wird einmal zu oft durchlaufen | Dilandau | PHP Tipps 2006 | 15 | 07.07.2006 17:14 |
| foreach geht aber abfrage nicht... | GELight | PHP Tipps 2006 | 8 | 01.03.2006 23:53 |
| durch foreach auch normalen String durchlaufen lassen | PHP Tipps 2006 | 7 | 14.01.2006 13:20 | |
| ProgressClass zeigt Fortschritte in foreach nicht a | PHP Tipps 2006 | 9 | 13.01.2006 00:11 | |
| falsche Eingaben in URL abfangen...id an DB etc... | argon | PHP Tipps 2007 | 2 | 18.11.2005 10:15 |
| $_FILES mit foreach() | PHP Tipps 2005-2 | 5 | 20.10.2005 10:27 | |
| Was ist eigentlich jetzt 'kommerzielle Nutzung'? | Off-Topic Diskussionen | 19 | 19.07.2005 21:50 | |
| foreach probleme | PHP Tipps 2005 | 7 | 26.04.2005 17:54 | |
| foreach: Übergabe by reference | Stümper | PHP Tipps 2005 | 2 | 15.02.2005 15:35 |
| for / foreach problem | PHP-Fortgeschrittene | 4 | 19.11.2004 16:58 | |
| foreach problem | mAy^daY | PHP Tipps 2004 | 3 | 02.06.2004 20:29 |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.