Mettre en page par colonne

Petit nouveau ! | 4 Messages

09 avr. 2011, 10:39

Bonjour,

je débute en programmation, j'ai quelques bases, mais j'ai aucun tallent pour la prog.
bref,
je réalise un site e-commerce, et pour afficher les objets a vendre, j'aimerais pouvoir afficher le contenu de mon xml sur 2 voir 3 colonnes.
le problemes c'est que je ne sais pas comment faire et que pour le moment la seulle chose que j'ai réussi a faire c'est de dupliquer la premiere colonne dans la deuxieme !
le mieux est de vous montrer en direct:
http://blackantmaster.com/Store/BeastCartoon.php

la mise en page est bonne mais pas le contenu.

Petit nouveau ! | 4 Messages

09 avr. 2011, 13:41

ok,
voila en gros le contenu de la cellule centrale:

Code : Tout sélectionner

<tr> <td width="10"></td> <td width="642"><table width="300" height="94" border="0" align="center" cellpadding="0" cellspacing="0" > <?php if (file_exists('beastcart.xml')) { $xml = simplexml_load_file('beastcart.xml'); $catalos = ($xml->catalo); foreach ($catalos as $catalo) { echo "<tr width='300'>\n<td>"; printf('<p class="style1"><strong>%s</strong></p>', $catalo->nom); echo "</tr><tr>\n<td width='109'>"; printf('<a href="%s"><img src="img/%s" alt="%s" width="105" height="105" border="2" bordercolor="#000000" "/></a>',$catalo->image_princ->href, $catalo->image_princ->src,$catalo->image_princ->alt ); echo "</td>\n<td width='10'>\n</td> <td width='191'>"; printf('<p>%s polys</p>', $catalo->poly); printf('<p>%s vertices</p>', $catalo->vert); printf('<p>Price : <strong> %s €</strong></p>', $catalo->prix); echo "</td>\n</tr>"; echo "<tr>\n</tr>"; } } else { exit('Failed to open catalos_1.xml.'); } ?> </table></td> <td width="642"><table width="300" height="94" border="0" align="center" cellpadding="0" cellspacing="0" > <?php if (file_exists('beastcart.xml')) { $xml = simplexml_load_file('beastcart.xml'); $catalos = ($xml->catalo); foreach ($catalos as $catalo) { echo "<tr width='300'>\n<td>"; printf('<p class="style1"><strong>%s</strong></p>', $catalo->nom); echo "</tr><tr>\n<td width='109'>"; printf('<a href="%s"><img src="img/%s" alt="%s" width="105" height="105" border="2" bordercolor="#000000" "/></a>',$catalo->image_princ->href, $catalo->image_princ->src,$catalo->image_princ->alt ); echo "</td>\n<td width='10'>\n</td> <td width='191'>"; printf('<p>%s polys</p>', $catalo->poly); printf('<p>%s vertices</p>', $catalo->vert); printf('<p>Price : <strong> %s €</strong></p>', $catalo->prix); echo "</td>\n</tr>"; echo "<tr>\n</tr>"; } } else { exit('Failed to open catalos_1.xml.'); } ?> </table></td> </tr>