Hocam php ile değil css ile ilgili bir durum sanırım örnek verecek olursak;

.ornek{
background-color: #cccccc;
}

.ornek:hover{
background-color: #666666;
}
yada

<tr onmouseout="this.bgColor='';" onmouseover="this.bgColor='#cccccc';" bgcolor="#666666">