Thread: PHP Question
View Single Post
Old 09-27-2003, 11:15 PM  
kad
Confirmed User
 
Join Date: Feb 2003
Location: Brisbane, Australia
Posts: 735
PHP Code:

<?php
    $file        
"test.txt";
    
$file_Content    file($file);

    
$j 0;
    
$limit 5;

    while (
$j $limit) {
    
      if (
count($file_Content) > 0)    {
          
$line $file_Content[rand(0,count($file_Content)-1)];
    
      echo 
$line;
      }
      
      
$j++;

  }
?>
Try that. Chances are it will spit out the same line multiple times, but you could get around that with with a few extra lines of code.

Hit me up @ 227230257 and ill help ya if im around
__________________
lol internet.
kad is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote