bone282 commented on a Page, Random Text  -  May 16, 2009

array_rand is handy for getting random values:

print($random_text[array_rand($random_text)]);


from a file:

$file = file("randomquotes.txt");
print(trim($file[array_rand($file)]));

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.