pharse file random work with -n lines
| From: | WebDev | Date: | Thu, 06 Mar 2003 00:27:44 +0000 |
| Subject: | pharse file random work with -n lines | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138365@lists.php.net to get a copy of this message | ||
// Code start
$i = 0;
$fp = fopen ("./../../cgi-bin/Classifieds/data/ads.data", "r");
while($tmp= fgetcsv($fp,50000,"\|")) { $array[]=$tmp; }
fclose ($fp);
$rand_array=array_rand($array, 10);
foreach($rand_array as $line) {
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 ) = ($line);
echo " <font face=\"Verdana\" size=\"1\">$line <a
href=\"../../cgi-bin/file/handle?session_key=&search_and_display_db_button=o
n&db_id=$adnr&query=retrieval\" target=\"_blanko\">$Endzwei $End3
</a><br>
</font>";
}
// Code end
Only returns the random line numbers on the page : $line
no errors no content
the arrays are empty ?
can not find out whats wrong,