Problème PHP "Notice: Undefined offset..."
Résolu
Elodie
-
Elodie -
Elodie -
Bonjour,
J'ai des problèmes avec mon code php pour une image aléatoire. J'actualise ma page, j'ai une image, encore une autre, et puis soudain ce code :
Notice: Undefined offset: 4 in C:\wamp\www\atoutage\templates\atoutage\index.php on line 68
Voici mon code php :
<?php
$imgs = array('footer1.png', 'footer2.png', 'footer3.png', 'footer4.png');
$randBg = $imgs[rand(1,count($imgs))];
?>
Je suis HYPER débutante.
Merci de m'avoir lue...
J'ai des problèmes avec mon code php pour une image aléatoire. J'actualise ma page, j'ai une image, encore une autre, et puis soudain ce code :
Notice: Undefined offset: 4 in C:\wamp\www\atoutage\templates\atoutage\index.php on line 68
Voici mon code php :
<?php
$imgs = array('footer1.png', 'footer2.png', 'footer3.png', 'footer4.png');
$randBg = $imgs[rand(1,count($imgs))];
?>
Je suis HYPER débutante.
Merci de m'avoir lue...