Dagon, thanks for the reply.
Where would I put: ltrim($nextmenuitem, "."); in this line:
if (substr($nextmenuitem[0],0,1)=='.') {echo "<br />";} else {echo "</td></tr><tr><td> </td></tr>\n";}
I tried a few different spots and it didn't work.
Thanks for the help.
-R