Yes I did all what you suggested !
tried all value carrieres and none has a value
as well tried print_r($line); and it gives me the last random line number
from 10 random line numbers displayed already if I use $line
The sdcript dosn't grab the line only the random numbers are ready
Can somebody
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,5,"\|")) { $array[]=$tmp; }
fclose ($fp);
$rand_array=array_rand($array, 10);
foreach($rand_array as $line) {
did you check to print_r($line); here to s
t;[EMAIL PROTECTED]>
To: WebDev <[EMAIL PROTECTED]>
Sent: Tuesday, March 04, 2003 9:11 AM
Subject: Re: [PHP] pharse file random work with -n lines
You don't need to use fgets after the while loop (you are at the end of
the file), $rand_array will contain your desired random rows:
the last script gives me no error but it returns nothing on the page only
empty
- Original Message -
From: Marek Kilimajer <[EMAIL PROTECTED]>
To: WebDev <[EMAIL PROTECTED]>
Sent: Tuesday, March 04, 2003 9:11 AM
Subject: Re: [PHP] pharse file random work with -n lines
to return
it random
- Original Message -
From: Marek Kilimajer <[EMAIL PROTECTED]>
To: WebDev <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, March 04, 2003 5:00 AM
Subject: Re: [PHP] pharse file random work with -n lines
while(list ($adnr, $user, $date, $listed, $
while(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,
6 matches
Mail list logo