<?xml version="1.0" encoding="windows-1252"?>
<node id="1007564" title="Re^2: Reading files n lines a time" created="2012-12-06 08:29:11" updated="2012-12-06 08:29:11">
<type id="11">
note</type>
<author id="823119">
naturalsciences</author>
<data>
<field name="doctext">
 &lt;p&gt;Hmm looked through my test script and yes it seems that the while(&lt;&gt;){$nextline=&lt;&gt;;$thirdline=&lt;&gt;} can actually be extended indefinetly. It is ugly but gets the job done.&lt;/p&gt;

 &lt;p&gt;Why my scripts crashed seems to be of the undefined variables you get when your text files line number is not divisible by the number of your $nextlines. Then in the end you will get undefined variables for your $nextlines&lt;/p&gt;
 &lt;p&gt;
I need to get some control element that would terminate the script (or loop if I want to continiue with script) nicely.
I think akin to  -  if any variables undefined exit loop, in the beginning of the loop. Should stop it from panicking with unfavorable Eof situation.&lt;/p&gt;
</field>
<field name="root_node">
1007560</field>
<field name="parent_node">
1007562</field>
</data>
</node>
