Re: how to include() N lines?

From: Date: Tue, 02 Sep 2003 23:27:39 +0000
Subject: Re: how to include() N lines?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-161500@lists.php.net to get a copy of this message
thanks for your answers! i'm not quite sure if i made my point clear. this is my problem: image.php <? header("Content-type: image/png"); $image = imagecreate(510, 510); $color = ImageColorAllocate($image, 0, 0, 0); include("database.php"); ImagePNG($image, '', 95); imagedestroy($image); ?> database.php <? imageline($image, 420, 468, 308, 372, $color); imageline($image, 132, 154, 146, 144, $color); imageline($image, 420, 318, 440, 180, $color); imageline($image, 418, 474, 476, 320, $color); imageline($image, 418, 474, 476, 324, $color); [...] ?> instead of including the whole database.php i need to include only a given number of lines, always starting with the first one. because database.php contains 10'000+ lines and therefore also the number of lines to include may be pretty high i don't know if importing the lines into a variable is a good idea. any suggestions? thanks a lot for your effort philipp

« previous php.general (#161500) next »