pharse file random work with -n lines

From: Date: Tue, 04 Mar 2003 09:17:47 +0000
Subject: pharse file random work with -n lines
Groups: php.general 
Request: Send a blank email to php-general+get-138032@lists.php.net to get a copy of this message
how can you return this randomized? how can I get every time I call this function a random set of lines ? Working Code to read 10 first lines and split the individual line into info careeners and do something with it .... .... $i = 0; $fp = fopen ("../../../../../public/httpd/html/datacontainer/data/storage.data", "r"); while (!feof ($fp) && $i < 10) { $i++; $buffer = fgets($fp, 4096); list ($adnr, $user, $date, $listed, $hlong, $eins, $zwei, $drei, $vier, $usern, $locst, $locstaa, $locc, $funf, $sech, $email, $Url, $ClassCat, $ClassCat2, $Headstart, $Headend, $Descrip, $End1, $Endzwei, $End3, $Endvier, $Endfunf, $Endsech, $Endsieben, $Endacht, $Endne, $dreizwei, $dreidrei, $dreivier, $dreifunf, $dreisechs ) = split ("\|", $buffer); \\ do something } fclose ($fp);

« previous php.general (#138032) next »