Re: loop

From: Date: Tue, 03 Apr 2001 07:12:52 +0000
Subject: Re: loop
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-508@lists.php.net to get a copy of this message
Hi, Andrei Zmievski wrote: > I can see two possible syntaxes: > > 1) $inner/(outer/books.authors) - basically using parentheses to define > precedence of looping. > > 2) $outer/.authors./inner/books - introducing keys into the indexing > chain, this would be the same as $books[outer]['authors'][inner]. That's weird, books is on the end of the statement, but it ends up on the left of the php code. Shouldn't it be $outer/.books./inner/authors then? And why the two dots? $outer/.books/inner/authors would be enough I guess. And maybe the slash could be removed as well. $outer.books/inner/authors? all options look complex. Template designers would have a hard time understanding the syntax. I myself found the $outer/inner stuff already confusing. Maybe we shouldn't work with sequence names, but with indexes. Something like: {$books[outer].authors[inner]} This looks more intuitive, and it resembles the php output a bit more. Hmm, this looks a lot easier to understand. And parsable. What do you think? Greetings, Ivo -- Ivo Jansch <ivo@ibuildings.nl> ibuildings.nl BV - information technology http://www.ibuildings.nl

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