Article proposé
---------------
L'article "To display elements as rows in a table" est proposé à la
publication.
Vous êtes invité à venir le consulter et à donner votre opinion
dans le forum qui lui est attaché. Il est disponible à l'adresse :
http://www.spip.net/ecrire/articles.php3?id_article=2162
** To display elements as rows in a table **
par Paul Knight
For example, you want to create a table containing the titles of a
section’s articles arranged in three columns, the number of lines
depending on the total number of articles, like this:
article 1article 2article 3article 4article 5article 6article 7article
8article 9
This trick involves using the doublons (unique) criterion and a recursive
loop. You first build a loop which displays the first three articles of the
section with the doublons criterion to eliminate duplicates. You can see
that it is then enough to re-invoke this loop each time gradually
displaying all the remaining articles. For that, in the conditional code of
this loop, you (...)