PHP Random quotes using arrays

Random quotes using arrays

<?
$file = "q.txt";
$r = rand(0,count(file($file))-1);
$a = file($file);
echo "$a[$r]";
?>