Re: [SMARTY] [basic] help with a section / array

From: Date: Thu, 03 Jul 2003 13:12:36 +0000
Subject: Re: [SMARTY] [basic] help with a section / array
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9825@lists.php.net to get a copy of this message
On Thu, Jul 03, 2003 at 01:57:32PM +0200, Luc Saint-Elie wrote: > Hello, > > Sorry to upset with this basic stuff but I'm struggling with the correct > section to display the following array. > > The array comes from a newsgroup messages listing, the first item is the > messageid and the secondary array is the message data. section only works on zero-based, numeric array-keys and not on hash-arrays. use foreach: {foreach from=$data key=messageid item=message} {$messageid}/{$message.number}: {$message.Subject} {/foreach} HTH messju > ========================================================== > Array > ( > [<3f0415fa$0$12439$626a54ce@news.free.fr>] => Array > ( > [number] => net-fr.net fr.rec.photo.numerique:14440 > [Subject] => 2257 > [From] => 17 > [Date] => Xref: use > [Message-ID] => <3f0415fa$0$12439$626a54ce@news.free.fr> > [References] => <bdc0kr$ltq$1@news-reader1.wanadoo.fr> > <bdcfgh$20h$1@biggoron.nerim.net> <3EF9C325.2030806@ifrance.com> <bdcg1l$2 > [Bytes] => 1393 > [Lines] => 17 > [Xref] => Xref: > ) > > [<3f0414fe$0$12434$626a54ce@news.free.fr>] => Array > ( > [number] => usenet-fr.net fr.rec.photo.numerique:14439 > [Subject] => Re: Digital-shopping > [From] => funfunfun <funfunfun@free.fr> > [Date] => Thu, 03 Jul 2003 13:33:08 +0200 > [Message-ID] => <3f0414fe$0$12434$626a54ce@news.free.fr> > [References] => <be122d$pfu$1@news-reader3.wanadoo.fr> > <3F040E61.C7E27B48@wanadoo.fr> <3f04114f$0$26579$626a54ce@news.free.fr> > [Bytes] => 1393 > [Lines] => 17 > [Xref] => Xref: > ) > [.....] > =============================================================== > > > > -- > Smarty General Mailing List (http://smarty.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.smarty.general (#9825) next »