RE: [PHP] including() only given amount of lines

From: Date: Sun, 11 May 2003 17:03:42 +0000
Subject: RE: [PHP] including() only given amount of lines
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-147216@lists.php.net to get a copy of this message
On 11-May-2003 PHP Devs @ Matter Solutions wrote: >> From: iliketheworld@gmx.ch [mailto:iliketheworld@gmx.ch] >> >> man >> but i also need to output a given amount of lines located somewhere in >> the >> middle of the document: how can i print the lines from 130 to 150 for >> example? >> > Ahh for this.... you'd better just use fopen as above and unset what you > dont need. > $beg=130; $end=150; $cnt=$end-$beg; $cmd="head -$end $filename | tail -$cnt"; exec($cmd, $output); Regards, -- Don Read dread@texas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.

« previous php.general (#147216) next »