<?xml version="1.0" encoding="windows-1252"?>
<node id="963345" title="Re^3: Looping and counting" created="2012-04-03 21:44:33" updated="2012-04-03 21:44:33">
<type id="11">
note</type>
<author id="892462">
Riales</author>
<data>
<field name="doctext">
&lt;p&gt;Put this between your two &lt;code&gt;for&lt;/code&gt; loops:&lt;/p&gt;

&lt;code&gt;
$main_list2 = '';
&lt;/code&gt;

&lt;p&gt;But seeing as you have have a &lt;code&gt;$main_list2&lt;/code&gt;, why don't you use &lt;code&gt;$main_list1&lt;/code&gt; in the first &lt;code&gt;for&lt;/code&gt; loop instead?&lt;/p&gt;

&lt;p&gt;Also, probably want to have a &lt;code&gt;"\n"&lt;/code&gt; between your titles:&lt;/p&gt;

&lt;code&gt;
$main_list2 .= "$title\n";
&lt;/code&gt;</field>
<field name="root_node">
963339</field>
<field name="parent_node">
963344</field>
</data>
</node>
