Jump to content


Photo

Table Parsing Help


  • Please log in to reply
No replies to this topic

#1 fewchurpro

fewchurpro
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 22 October 2006 - 07:55 AM

I have a parsed file to read an rss file and im trying to make it table in its own box, though the box is very detailed. The trouble im having is it is not drawing the box correctly. This is the output code for it:

// output HTML
// print ("<div class=\"channelname\">" . $rss_channel["TITLE"] . "</div>");

if (isset($rss_channel["ITEMS"])) {
if (count($rss_channel["ITEMS"]) > 0) {
for($i = 0;$i < 5;$i++) {
if (isset($rss_channel["ITEMS"][$i]["LINK"])) {
print ("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td background=\"wow5summ_01.jpg\" height=\"33\" width=\"64\"></td><td background=\"wow5summ_02.jpg\" height=\"33\">\n<div class=\"itemtitle\"><a href=\"" . $rss_channel["ITEMS"][$i]["LINK"] . "\"><strong><font color =\"#b7baab\" size =\"2\">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</font></strong></a></td><td background=\"wow5summ_03.jpg\" width=\"46\" height=\"33\"></td></tr></div>");
} else {
print ("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"64\" background=\"wow5summ_01.jpg\" height=\"33\"></td><td background=\"wow5summ_02.jpg\" height=\"33\">\n<div class=\"itemtitle\"><strong><font color=\"#b7baab\" size=\"2\">" . $rss_channel["ITEMS"][$i]["TITLE"] . "</font></strong></td><td background=\"wow5summ_03.jpg\" width=\"46\" height=\"33\"></td></tr></div>");
}
print ("<tr><td background=\"wow5summ_04.jpg\" width=\"64\" height=\"20\"></td><td background=\"wow5summ_05.jpg\"></td><td background=\"wow5summ_06.jpg\" width=\"46\" height=\"20\"></td></tr>");
print ("<tr><td background=\"wow5summ_07.jpg\" width=\"64\" height=\"86\"></td><td background=\"wow5summ_08.jpg\"><font size=\"2\"><div class=\"itemdescription\">" . $rss_channel["ITEMS"][$i]["DESCRIPTION"] . "</font></td><td background=\"wow5summ_09.jpg\" width=\"64\" height=\"86\"></td></tr></div>");
print ("<tr><td background=\"wow5summ_10.jpg\" width=\"64\" height=\"25\"></td><td background=\"wow5summ_11.jpg\"></td><td background=\"wow5summ_12.jpg\" width=\"46\" height=\"25\"></td></tr></table><br/>");            }
} else {
print ("<b>There are no articles in this feed.</b>");
}
}



And this is the test page file im using for testing purposes.

Page File

I have the box drawn out at the bottom of that page to show what it is supposed to look like. I need help figuring out what I have done wrong to cause it to draw the end <td> portions over and over again. Any help would be appreciated.

Thank you




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users