Hi bpat,
I used the switch because I was trying to stick with some code that was working (that I did not write and did not follow completely). Some of the code came from this post here.
Here is a snippet of a more complete list of the code.
<?php
echo '<table>';
while ($row = mysql_fetch_assoc($result)) {$array[$row['Day2']][] = $row;}
foreach ($array as $key => $value)
{
$day = $key;
?>
<tr>
<td bgcolor=white style="padding-top:2px;padding-bottom:2px;background-image: url(../images/tab2.gif);background-repeat: no-repeat;padding-left:10px;font-family:tahoma;letter-spacing:1px;font-size:12px;font-weight:bold;color:#2E7045;border-left:1px solid #99B4C9;border-right:1px solid #99B4C9"><img src="../images/bullet-blu.gif" width="12" height="12" align="left" style="margin-top:1px;margin-right:5px" /><?php echo $day.':'; ?> </td>
</tr>
<?php
foreach ($value as $subvalue) {
?>
<tr>
<td bgcolor=white align=center style="border-top: 1px solid #bfbfbf;border-left:1px solid #99B4C9;border-right:1px solid #99B4C9;padding:8px"> <a class="links" href="article3.php?ID=<?php echo $subvalue['ID']; ?>" onClick="NewWindow(this.href,'name','740','500','yes');return false"><font style="font-family:arial;font-weight:bold;font-size:16px"><?php echo $subvalue['Quote']; ?></font></a><br />
<font style="color:#333333;font-size:13px"><?php echo $subvalue['Source']; ?></font></td>
</tr>
<?php
}
}
?>
</table>
Where the
is displayed, I am trying to get 2006-10-09 as the end result, but I am not sure how to with the
while ($row = mysql_fetch_assoc($result)) {$array[$row['Day2']][] = $row;}
foreach ($array as $key => $value)
loop.
This is for a current events listing and it worked, but I know need to show the actual date of the event instead of the weekday name, and I could not get it to work.
I am TOTALLY open to suggestions here.
Here is the link to my test page.
And the original page.
Thanks,
Don