Bonjour,
Je voudrais afficher 2 images par ligne, voilà mon code.
1 2 3 4 5 6 7 8 9 10
| foreach ($video_row['files'] as $video):
$valeur = '<td class="text" style="vertical-align: top; padding: 5px; width: 25%;"><a href="' . $video['url'] . '" title="' . $video['title'] . '"><img alt="' . $video['title'] . '" style="border: 0px; width: 128px; height: 96px;" src="' . $video['image_url'] . '" /></a><p><b><span style="font-size:10px">' . crop_string($video['title'],17) . '</span></b></p></td><td> </td>';
for($i=1;$i<3;$i++){
if($i==1){echo '<tr style="background-color: white;">';}
echo $valeur;
if($i==3){echo '</tr>';}
}
endforeach; |
Le problème, c'est que ça affiche la même image sur chaque ligne.
Quelqu'un peut-il m'aider ?
Merci d'avance
Partager