Thread: PHP Script help
View Single Post
Old 09-11-2003, 12:01 AM  
raster
Confirmed User
 
Join Date: Aug 2003
Posts: 784
Quote:
Originally posted by JSA Matt
keep it simple : )

PHP Code:
<?php
    $file        
"random.txt";
    
$file_Content    file($file);

    if (
count($file_Content) > 0)    {
        
$line $file_Content[rand(0,count($file_Content)-1)];
    
    echo 
$line;
    }
?>
Thanks very much, works great.
raster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote