Thread
:
PHP: Displaying random lines from text file
View Single Post
12-24-2008, 02:43 AM
pornbling
Registered User
Join Date: Apr 2008
Location: underground
Posts: 251
try this:
$fp=file('yourfile.txt');
shuffle($fp);
echo $fp[0];
This should do it. If you want to see more
echo $fp[1]; echo $fp[2]; ...
pornbling
View Public Profile
Find More Posts by pornbling