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 printet in this example.

How can i make sure that it will allways display the colors
On each line ??


Bård Tommy Nilsen

$query_1 = mysql_query("select * from $tabell_4"); 
$number_1 = mysql_numrows($query_1) ;
$i_1 = 0;
$bgcolor[0] = "#FFE38E";
$bgcolor[1] = "#FFFFFF";

$Search = "Test";

while ($i_1 < $number_1) {
 $Name = mysql_result($query_1,$i_1,"Name");

if (eregi ($Search, $Name)) {

Echo '<tr BGCOLOR='.$bgcolor[$i_1%2].'>';



PHP General Mailing List (
To unsubscribe, visit:

Reply via email to