Problème PHP "Notice: Undefined offset..."
Résolu/Fermé
A voir également:
- Notice: undefined offset: 4
- Notice d'utilisation - Guide
- Code gta 4 ps4 - Guide
- Control center 4 - Télécharger - Divers Utilitaires
- Velo domyos fc 700 notice - Forum Loisirs / Divertissements
- A4 divisé en 4 - Forum Graphisme
2 réponses
Meoran
Messages postés
1562
Date d'inscription
vendredi 28 août 2009
Statut
Membre
Dernière intervention
8 avril 2015
206
Modifié par Meoran le 15/06/2011 à 22:32
Modifié par Meoran le 15/06/2011 à 22:32
Salut,
les tableaux php commencent à l'index 0 ;)
Donc $imgs[4] n'existe pas dans ton cas, ça s'arrête à 3.
Il faut que tu fasses :
$randBg = $imgs[rand(0,count($imgs)-1)];
les tableaux php commencent à l'index 0 ;)
Donc $imgs[4] n'existe pas dans ton cas, ça s'arrête à 3.
Il faut que tu fasses :
$randBg = $imgs[rand(0,count($imgs)-1)];