here is that code I talked about <?php $alphabet = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q'); $rowCount = 14; $totalSeats = 238;
$taken = array(1,3,5,7,11); ?> <table class="seattable" width="650"> <?php for($i=0; $i<$totalSeats; $i++) { $val = $i + 1; if($i % $rowCount) { echo "<TD>"; } else { echo "<TR>"; echo "<TD nowrap>"; echo $alphabet[($i / $rowCount)]; echo "</TD>"; echo "<TD nowrap>"; } if(in_array($val, $taken)) { echo "<CENTER><STRIKE>{$val}</STRIKE></CENTER>"; } else { echo "<nobr><input type='radio' name='Seat_{$val}'> {$val}</nobr>"; } if($i % $rowCount + 1) echo "</TD>"; else echo "</TD></TR>"; } echo "</TABLE>"; ?> Give it a run and let me know what you think. Jim Lucas ----- Original Message ----- From: "Jay Fitzgerald" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 25, 2003 6:23 PM Subject: [PHP] if seat is sold > 1. here is my code: http://codedump.phpfreaks.com/viewcode.php?id=1162 > 2. here is a screenie of my seating chart: http://www.bayou.com/jay/chart.gif > > 3. what i am wanting to do is using CSS i want to "strike-through" the > seats that are in the db - else, I want them to display normally > > note: the seat numbers are not in the db unless someone chooses that > seat....they are a while loop of numbers 1 through 240.... > > Anyone got any ideas? > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php