Re: Brain Fart- table formatting help

From: Date: Mon, 29 Jul 2002 21:47:56 +0000
Subject: Re: Brain Fart- table formatting help
Groups: php.general 
Request: Send a blank email to php-general+get-110258@lists.php.net to get a copy of this message
>The one constant is that if ($row->show_title) is true the table row will >have a background color then I need to make the rows after that alternate >until if ($row->show_title) is true again. > >Roughly I have the whole thing laid out like this right now: > >echo "<table BORDER=\"0\" CELLSPACING=\"0\" >CELLPADDING=\"2\">\n"; $colors[0] = 'FF0000'; $colors[1] = '00FF00'; $color = 0; >while($row = mysql_fetch_object($result)) { if ($row->show_title){ $color++; } # Now you can use $color % 2 like usual. > if($row->show_company && $row->show_title && $row->show_month) { > display month; > } else if ($row->show_title) { > display title; > display first row with background color; > } else { > display rows with no background color; //right here needs to alternate ><tr> background color > } >} >echo "</table>"; > >I think I've been looking at his too long and I just have jello brain right >now but I just can't seem to straighten this out in my head... > >Thanks for the help... > >-B > -- Like Music? http://l-i-e.com/artists.htm I'm looking for a PRO QUALITY two-input sound card supported by Linux (any major distro). Need to record live events (mixed already) to stereo CD-quality. Soundcard Recommendations? Software to handle the recording? Don't need fancy mixer stuff. Zero (0) post-production time. Just raw PCM/WAV/AIFF 16+ bit, 44.1KHz, Stereo audio-to-disk.

« previous php.general (#110258) next »