Re: [PHP] What kind of looping ?

2001-11-27 Thread Dan McCullough
try using $count=0; before the loop (while loop is fine) then before the end of the loop $count++; inside the loop if ($count % 4) { that is where you want it to break and start running the other code } so you would have $table = ""; $counter = 0; while ($tableset = mysql_fetch_array($result) )

Re: [PHP] What kind of looping ?

2001-11-27 Thread Steve Werby
"Steve Maroney" <[EMAIL PROTECTED]> wrote: > Now $file_list[] has some number a file names. I want print 4 file names > into a row. Each file name has to be in its on cell. > > >FILE 0 FILE 1 FILE 2 FILE 3 >FILE 4 FILE 5 FILE 6 FILE 7 > > > I would image I would use a for loop, but

Re: [PHP] What kind of looping ?

2001-11-27 Thread Hank Marquardt
echo ""; while(list(,$fname) = each($file_list)) { if(!($cnt % 4) && $cnt++!=0) { echo ""; } echo "$fname"; } echo ""; Didn't actually test that, but it should be close ... the important piece is ($cnt % 4) ... modulo arithmetic is your fri

[PHP] What kind of looping ?

2001-11-27 Thread Steve Maroney
Hey guys, I cant figure out what functions and/or looping I need to use for what I need to do. Im reading a directory and pushing all the file names in the directory into an arrary. I want to be able print out each element(file name) in the array into an HTML table while limiting a certain numb