Re: [PHP] Different colors on lines

2002-06-13 Thread Miguel Cruz
On Fri, 14 Jun 2002, Bård Tommy Nilsen wrote: > Can anyone help out with this ?? > > Since i do the search after the query, there is an problem if line 1 in the > Sql table matches, line 2 does not, but line 3 does. > > Then the result will display the same color on the two lines > That would be

Re: [PHP] Different colors on lines

2002-06-13 Thread Chris Bunting
Hello, Check out the following link. http://www.zend.com/codex.php?CID=322 There are various code examples for alternating table backgrounds. Hope this helps, Chris Bunting _ Send and receive Hotmail on your mobile device: http:/

RE: [PHP] Different colors on lines

2002-06-13 Thread Martin Towell
have a seperate counter $query = mysql_query("select * from $tabell_4"); $number = mysql_numrows($query) ; $i = 0; $bgcolor[0] = "#FFE38E"; $bgcolor[1] = "#FF"; $Search = "Test"; $j = 0 while ($i < $number) { $Name = mysql_result($query_1,$i,"Name"); if (eregi ($Search, $Name)) { Echo '