Thread
:
PHP: Displaying random lines from text file
View Single Post
12-23-2008, 06:20 PM
NickSunshine
Confirmed User
Join Date: Mar 2006
Posts: 1,196
PHP Code:
<?
$a=file('filename.txt');
$b=array_rand($a);
print($a[$b]);
?>
__________________
NickSunshine
View Public Profile
Find More Posts by NickSunshine