php3-list | 199903
Date: 03/18/99
- Next message: Big Mike: "Re: [PHP3] Semi-OT: The Linux plunge"
- Previous message: Greg Kelley: "RE: [PHP3] how to use cookie"
- In reply to: Timothy Sarver: "[PHP3] displaying search results"
- Next in thread: Calum Lasham: "RE: [PHP3] displaying search results"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Timothy Sarver wrote:
>
> Does anyone have a script that will display the results of a search in
> alternating colors; one row white the next light gray, ect,ect.
>
> Thanks
Use a loop to dynamically build a table, and set the first table row
color before the loop:
$rowcolour = "#CCCCCC";
for (....) {
print("
<tr rowcolor=\"$rowcolor\">
<td>foobar</td>
</tr>
");
switch($rowcolour) {
case "#CCCCCC":
$rowcolour = "#FFFFFF";
break;
case "#FFFFFF":
$rowcolour = "#CCCCCC";
break;
}
}
Jason
-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3 List administrator: zeev-list-admin <email protected>
- Next message: Big Mike: "Re: [PHP3] Semi-OT: The Linux plunge"
- Previous message: Greg Kelley: "RE: [PHP3] how to use cookie"
- In reply to: Timothy Sarver: "[PHP3] displaying search results"
- Next in thread: Calum Lasham: "RE: [PHP3] displaying search results"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

