Afficher plusieures images + liens aléatoire?
Résolu
smed_79
Messages postés
1291
Date d'inscription
Statut
Contributeur
Dernière intervention
-
smed_79 Messages postés 1291 Date d'inscription Statut Contributeur Dernière intervention -
smed_79 Messages postés 1291 Date d'inscription Statut Contributeur Dernière intervention -
Bonjour,
pour afficher une image + un lien aléatoirej'utilise le code:
je cherche comment afficher plusieures images + liens aléatoire ?
un exemple sur cette image : http://img50.xooimage.com/files/b/4/2/capture-238a82d.jpg
merci
pour afficher une image + un lien aléatoirej'utilise le code:
<?php $homeurl = "http://www.top-favoris./" ; $imgurl = "http://i64.servimg.com/u/f64/11/94/21/24/" ; $img = array( 0 => array("fifa10.gif", "sport/fifa.html"), 1 => array("uefa10.jpg", "sport/uefa.html"), 2 => array("cafonl10.gif", "sport/cafonline.html"), 3 => array("afc10.gif", "sport/the-afc.html"), 4 => array("concac10.gif", "sport/concacaf.html"), 5 => array("livesc10.jpg", "sport/livescore.html") ); srand ((double)microtime()*1000000); shuffle($img); echo '<a href="' . $homeurl . '' . $img[0][1] . '" ><img src="' . $imgurl . '' . $img[0][0] . '"></a>'; ?>
je cherche comment afficher plusieures images + liens aléatoire ?
un exemple sur cette image : http://img50.xooimage.com/files/b/4/2/capture-238a82d.jpg
merci
A voir également:
- Afficher plusieures images + liens aléatoire?
- Afficher appdata - Guide
- Des images - Guide
- Afficher taille dossier windows - Guide
- Windows 11 afficher d'autres options - Guide
- Afficher mot de passe wifi android - Guide
maintenant si j'ai 20 images + 20 liens comment afficher un nombre limité par exemple 5 ?
après shuffle($img); biensur :)
for($i=0;$i<5;$i++)
{
echo '<a href="' . $homeurl . '' . $img[$i][1] . '" ><img src="' . $imgurl . '' . $img[$i][0] . '"></a>';
}