Re: [SMARTY] in_array function
| From: | olinux | Date: | Fri, 11 Apr 2003 02:15:02 +0000 |
| Subject: | Re: [SMARTY] in_array function | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-9214@lists.php.net to get a copy of this message | ||
thanks - actually, you answered my question. I guess
that is a bit extreme code/display separatation.
In situations like this. it seems a better option to
just build the "A | B | C | D" and output instead of
creating another array to loop through (sometimes it
makes sense).
template would be something like
<html> ... {$alphamenu} ... </html>
instead of
<html> ...
{section name=alpha loop=alphamenu}
... </html>
--- Monte Ohrt <monte@ispi.net> wrote:
> Sorry that I'm not answering your question, but
> asking one instead...
> wouldn't it be possible to do this data assembly in
> PHP and assign it in
> a structure that can just be looped through and
> displayed? The reason
> things like in_array are not already available is
> because they shouldn't
> be needed, and they prompt this kind of templating
> "abuse" :-) In your
> case I'd assemble and assign an 'is_linked' array
> instead of assembling
> it on-the-fly in the template.
>
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com