[SMARTY] {section} docs, was: Re: [SMARTY] Newbie Question: Associative Arrays and Sections

"Mark Rogers" <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Organization Quarella Ltd
Message-ID <002401c580a1$3ce99c40$1fc70005@mark>
Patrick Ben Koetter writes:
> WOW! That was quick! Thank you guys!

Patrick,

Based on what you said you obviously looked in the manual and the archives
for help before you tried this list for help on this one.

Since this must be one of the most commonly asked questions, the current
documentation is obviously not doing a very good job on this subject. So,
can you suggest (from your own point of view) how this could be made
clearer?

Personally I'd stick a big red note against {section} saying something to
the effect of:

    In most cases, and in ALL cases involving associative
    (non-numeric indexed) arrays or numerical indexes
    which don't increment from zero, you should use
    {foreach} rather than {section}.

Of-course a lot of people won't read it anyway, but at least those who do
will avoid this pitfall?

I worry that for every person who gets stuck here and mails the list there
must be someone who tried Smarty and gave up because they couldn't make it
work.

Mark Rogers,
More Solutions Ltd

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.