Hallo!
<?php
$random_review = $location."quotes.inc";
srand((double)microtime()*1000000);
if (file_exists($random_review)) {
$array = file($random_review);
for($i = 0; $i <= sizeof($array) ; $i++) {
if (preg_match("/\r/", $array[$i]))
$good_array[$i] = chop($array[$i]);
}
$randval = rand(0, sizeof($good_array));
echo $good_array[$randval];
}
else {
echo "error: can't open $random_review file";
}
?>
Bekomme bei der Ausgabe folgenden Fehler angezeigt: Undefined offset: 190 on line 7.
Woran liegt das? Was kann ich tun?
Gruß, Frank.