$arr = file("reviews.dat");
shuffle($arr);
$res = array_slice($arr, 0, 2);
foreach ($res as $str) {
echo $str;
}
$arr = file("reviews.dat");
shuffle($arr);
for($i=0; $i<2; $i++) {
echo $arr[$i];
}
$arr = file("reviews.dat");
$res = array_slice($arr, 0, 2);
foreach ($res as $str) {
echo $str;
}
$arr = file("reviews.dat");
$arr = array_reverse($arr);
$res = array_slice($arr, 0, 2);
foreach ($res as $str) {
echo $str;
}