Put this between your two for loops:
$main_list2 = '';
But seeing as you have have a $main_list2, why don't you use $main_list1 in the first for loop instead?
Also, probably want to have a "\n" between your titles:
$main_list2 .= "$title\n";
In reply to Re^3: Looping and counting
by Riales
in thread Looping and counting
by htmanning
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |