Re: pharse file random work with -n lines
| From: | Chris Hayes | Date: | Wed, 05 Mar 2003 23:29:11 +0000 |
| Subject: | Re: 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-138391@lists.php.net to get a copy of this message | ||
At 01:27 6-3-2003, you wrote:
// 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) { did you check to print_r($line); here to see if there is data in it?
echo $adnr; etc. here and see whether it has content?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>"; did you try to
} // 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, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php