Baldwin238
Technical User
I need help yet once again. I saw a reply by VRagabond to a similar question I have, but I can't seem to implement it correctly in my code.
I want to have alternating table row colors. I was able to code it correctly in .asp, but in php, somethings not clicking. I do use CSS Stylesheets and here is the php code...(The two colors I want the rows to alternate with are, #ffffff and #E2ECFC)
Jeff Baldwin
I want to have alternating table row colors. I was able to code it correctly in .asp, but in php, somethings not clicking. I do use CSS Stylesheets and here is the php code...(The two colors I want the rows to alternate with are, #ffffff and #E2ECFC)
Code:
<?php
$file = '[URL unfurl="true"]http://www.freerolls.net/feed.php';[/URL]
require_once('xml.parser.class.php');
$xml = new xml_parser_class();
$xml->parseFile($file);
$tree = $xml->getTree();
unset($xml);
print '<table id="main_table" border="1">';
print '<tr><td class="title">Time (Eastern)</td><td class="title">Payouts</td><td class="title">Site</td></tr>';
$i = 0;
foreach($tree['freerolls']['tournament'] as $k)
{
$i++;
$k['sitelink'] = str_replace("[URL unfurl="true"]http://www.freerolls.net/fclick/fclick.php?fid=","http://www.absolutelyfreerolls.com/fclick/fclick.php?id=",$k[/URL]['sitelink']);
print '<tr>';
print '<td>'.$k['time']['value'].'</td>';
print '<td>'.$k['payout']['value'].'</td>';
print '<td><a href="'.$k['sitelink']['value'].'">'.$k['sitename']['value'].'</td>';
print '</tr>';
}
print '</table>';
?>
Jeff Baldwin