Danke für die Hilfe! ;-)
So funktioniert es jetzt, mit foreach hab ichs nicht hinbekommen :-(
<?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 $array[$randval];
}
else { echo "error: can't open $random_review file";
}
?>
Gruß, Frank.