Need to refine this:
| From: | John Taylor-Johnston | Date: | Wed, 04 Feb 2004 04:56:44 +0000 |
| Subject: | Need to refine this: | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-176752@lists.php.net to get a copy of this message | ||
Hi,
I need to refine this. I'm tired ... long day.
I would like to echo $mydata->district only once unless it changes.
echo "<table>\n";
while ($mydata = mysql_fetch_object($glquery))
{
#----- if $mydata->district is different, then
echo "<tr
bgcolor=\"#CCCCCC\"><td>$mydata->district</td><td></td><td></td></tr>\n";
echo "<tr bgcolor=\"#CCCCCC\"><td>$mydata->city</td>
<td>$mydata->place</td>
<td>$mydata->meetingtime</td></tr>\n";
}
echo "</table>\n";
Clarity anyone :)
Thanks,
J