[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> on Tuesday, September 02, 2003 3:04 PM said:
> i need to include() only a given amount of lines (the first 10 for > example) instead of a whole file. > > does someone know how this has to be done? Yes. Remove those first ten lines (assuming they are removable) from the original file you had them in and then include them in the old file with include_once(). Then in the file you want to only include the ten lines just include the smaller file. Example: (I'm changing your 10 line requirement to 2 lines.) Original.php: Line 1 Line 2 Line 3 Line 4 Line 5 Take out Line 1 and Line 2 and put them in 2lines.php. 2Lines.php: Line 1 Line 2 Then Original.php becomes this: include_once "2Lines.php"; Line 3 Line 4 Line 5 Then in your other file that you need the 2 lines you can do just this: NewFile.php: include_once "2Lines.php"; HTH! Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php