View Single Post
Old 05-28-2004, 02:39 PM  
Nathan
Confirmed User
 
Industry Role:
Join Date: Jul 2003
Posts: 3,108
15.

you do give them damn weird functions to use, but you said I _MAY_ want to use them, I don't... so here goes: $file_to_open is the filename to print every 5th line from.

Code:
$lines = file($file_to_open);
$i = 4;
while($i < count($lines)) {
echo $lines[$i];
$i += 5;
}

Ok, what do I win?
__________________
"Think about it a little more and you'll agree with me, because you're smart and I'm right."
- Charlie Munger
Nathan is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote